Issue #5087
authorTimothy Bess <timbessmail@gmail.com>
Thu, 1 Mar 2018 22:14:57 +0000 (17:14 -0500)
committerTimothy Bess <timbessmail@gmail.com>
Thu, 1 Mar 2018 22:14:57 +0000 (17:14 -0500)
* change match to if

src/cargo/ops/cargo_compile.rs

index dcb3acfbca895157a96d9bd30850e3ba0d70ce6e..34cc9d63ebd71b051c1290cd71e32c4f15139566 100644 (file)
@@ -156,11 +156,11 @@ impl<'a> Packages<'a> {
             }
         };
         if specs.is_empty() {
-            match ws.is_virtual() {
-                true => bail!("manifest path `{}` contains no package: The manifest is virtual, \
-                                       and the workspace has no members.", ws.root().display()),
-                false => bail!("no packages to compile"),
+            if ws.is_virtual() {
+                bail!("manifest path `{}` contains no package: The manifest is virtual, \
+                       and the workspace has no members.", ws.root().display())
             }
+            bail!("no packages to compile")
         }
         Ok(specs)
     }