We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 788c52a commit 1b1ecccCopy full SHA for 1b1eccc
src/bin/main.rs
@@ -355,12 +355,11 @@ fn determine_operation(matches: &Matches) -> FmtResult<Operation> {
355
}
356
357
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);
+ if let Some(ref kind) = matches.opt_str("print-config") {
+ let path = matches.free.get(0).cloned();
361
if kind == "default" {
362
- return Ok(Operation::ConfigOutputDefault { path: path.clone() });
363
- } else if kind = "minimal" {
+ return Ok(Operation::ConfigOutputDefault { path });
+ } else if kind == "minimal" {
364
minimal_config_path = path;
365
if minimal_config_path.is_none() {
366
println!("WARNING: PATH required for `--print-config minimal`");
0 commit comments