Inline single use variable binding
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Wed, 11 Apr 2018 21:44:58 +0000 (23:44 +0200)
committerDirkjan Ochtman <dirkjan@ochtman.nl>
Wed, 11 Apr 2018 21:44:58 +0000 (23:44 +0200)
src/cargo/ops/cargo_clean.rs

index 2319470b22c264d5951a71ebc2bc0f1bd3b5b40c..48b61dd0904ddfd95c9e30a28c231973fcfa4959 100644 (file)
@@ -36,7 +36,6 @@ pub fn clean(ws: &Workspace, opts: &CleanOptions) -> CargoResult<()> {
     let (packages, resolve) = ops::resolve_ws(ws)?;
 
     let profiles = ws.profiles();
-    let host_triple = opts.config.rustc()?.host.clone();
     let mut units = Vec::new();
 
     for spec in opts.spec.iter() {
@@ -91,7 +90,7 @@ pub fn clean(ws: &Workspace, opts: &CleanOptions) -> CargoResult<()> {
         &packages,
         opts.config,
         BuildConfig {
-            host_triple,
+            host_triple: opts.config.rustc()?.host.clone(),
             requested_target: opts.target.clone(),
             release: opts.release,
             jobs: 1,