diff options
| author | Seiichi Uchida <seuchida@gmail.com> | 2018-05-12 10:36:34 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-12 10:36:34 +0900 |
| commit | 1b1eccc5535ba61204af6bc9e29fc2be5a4aec03 (patch) | |
| tree | 8808c91cbf220e84488c2cc36ccdb041420ddcd2 /src | |
| parent | 788c52ae74bfcad8d0bf72644120eff02826c706 (diff) | |
Fix build failure (#2699)
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/main.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/bin/main.rs b/src/bin/main.rs index ee17c024e69..00a582cb3cb 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -355,12 +355,11 @@ fn determine_operation(matches: &Matches) -> FmtResult<Operation> { } let mut minimal_config_path = None; - if matches.opt_present("print-config") { - let kind = matches.opt_str("print-config"); - let path = matches.free.get(0); + if let Some(ref kind) = matches.opt_str("print-config") { + let path = matches.free.get(0).cloned(); if kind == "default" { - return Ok(Operation::ConfigOutputDefault { path: path.clone() }); - } else if kind = "minimal" { + return Ok(Operation::ConfigOutputDefault { path }); + } else if kind == "minimal" { minimal_config_path = path; if minimal_config_path.is_none() { println!("WARNING: PATH required for `--print-config minimal`"); |
