Minor simplification
authorAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 12 Apr 2018 06:04:46 +0000 (09:04 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 12 Apr 2018 06:04:46 +0000 (09:04 +0300)
src/cargo/ops/cargo_install.rs

index 0a784780de397ddee5d2f8f6deaf4a1f1003beea..31aba409f53c9c225abfae49638b8d96790541ab 100644 (file)
@@ -224,14 +224,7 @@ fn install_one(
         Some(Filesystem::new(config.cwd().join("target-install")))
     };
 
-    let ws = match overidden_target_dir {
-        Some(dir) => Workspace::ephemeral(pkg, config, Some(dir), false)?,
-        None => {
-            let mut ws = Workspace::new(pkg.manifest_path(), config)?;
-            ws.set_require_optional_deps(false);
-            ws
-        }
-    };
+    let ws = Workspace::ephemeral(pkg, config, overidden_target_dir, false)?;
     let pkg = ws.current()?;
 
     if from_cwd {