Only add features flags if non-empty

This commit is contained in:
Edwin Cheng 2019-12-24 00:27:48 +08:00
parent 60aa4d12f9
commit 4ee3c5202e

View file

@ -165,7 +165,7 @@ impl CargoWorkspace {
// FIXME: `NoDefaultFeatures` is mutual exclusive with `SomeFeatures`
// https://github.com/oli-obk/cargo_metadata/issues/79
meta.features(CargoOpt::NoDefaultFeatures);
} else {
} else if cargo_features.features.len() > 0 {
meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone()));
}
if let Some(parent) = cargo_toml.parent() {