Skip to content

Commit

Permalink
Fix a Clippy warning reported for Rust 1.60 but not for 1.75
Browse files Browse the repository at this point in the history
Signed-off-by: Costin Lupu <[email protected]>
  • Loading branch information
clupuishere committed Jan 9, 2024
1 parent 2491f79 commit 35f8d64
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/common/commands_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -583,10 +583,12 @@ mod tests {

/// Parse the path of the JSON config file
fn parse_config_file(args: &ArgMatches) -> NitroCliResult<String> {
let config_file = args.value_of("config").ok_or(new_nitro_cli_failure!(
"`config` argument not found",
NitroCliErrorEnum::MissingArgument
))?;
let config_file = args.value_of("config").ok_or_else(|| {
new_nitro_cli_failure!(
"`config` argument not found",
NitroCliErrorEnum::MissingArgument
)
})?;
Ok(config_file.to_string())
}

Expand Down

0 comments on commit 35f8d64

Please sign in to comment.