Skip to content

Commit f294028

Browse files
committed
Do not treat cargo-metadata features as exclusive
This tracks a patch in cargo-metadata that lets us call features() more than once to express more complex feature configurations. We introduced the change in cargo-metadata 0.10.1, but this commit jumps us to 0.11.
1 parent 80fe0a9 commit f294028

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repository = "https://github.com/rust-embedded/cargo-binutils/"
1515
version = "0.3.0"
1616

1717
[dependencies]
18-
cargo_metadata = "0.10"
18+
cargo_metadata = "0.11"
1919
clap = "2.33"
2020
regex = "1.3"
2121
rustc-cfg = "0.4"

src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,11 @@ pub fn run(tool: Tool, matches: ArgMatches) -> Result<i32> {
280280
metadata_command.features(CargoOpt::SomeFeatures(
281281
features.map(|s| s.to_owned()).collect(),
282282
));
283-
} else if matches.is_present("no-default-features") {
283+
}
284+
if matches.is_present("no-default-features") {
284285
metadata_command.features(CargoOpt::NoDefaultFeatures);
285-
} else if matches.is_present("all-features") {
286+
}
287+
if matches.is_present("all-features") {
286288
metadata_command.features(CargoOpt::AllFeatures);
287289
}
288290
let metadata = metadata_command.exec()?;

0 commit comments

Comments
 (0)