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
As reported by `cargo +1.60 clippy --fix --allow-dirty`.

Signed-off-by: Costin Lupu <[email protected]>
  • Loading branch information
clupuishere committed Jan 9, 2024
1 parent f272cc5 commit 29f3a79
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 29f3a79

Please sign in to comment.