Skip to content

Commit 1b1eccc

Browse files
authored
Fix build failure (#2699)
1 parent 788c52a commit 1b1eccc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/bin/main.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -355,12 +355,11 @@ fn determine_operation(matches: &Matches) -> FmtResult<Operation> {
355355
}
356356

357357
let mut minimal_config_path = None;
358-
if matches.opt_present("print-config") {
359-
let kind = matches.opt_str("print-config");
360-
let path = matches.free.get(0);
358+
if let Some(ref kind) = matches.opt_str("print-config") {
359+
let path = matches.free.get(0).cloned();
361360
if kind == "default" {
362-
return Ok(Operation::ConfigOutputDefault { path: path.clone() });
363-
} else if kind = "minimal" {
361+
return Ok(Operation::ConfigOutputDefault { path });
362+
} else if kind == "minimal" {
364363
minimal_config_path = path;
365364
if minimal_config_path.is_none() {
366365
println!("WARNING: PATH required for `--print-config minimal`");

0 commit comments

Comments
 (0)