diff --git a/xtask/src/builder.rs b/xtask/src/builder.rs index 32a50b7af..7f29122d3 100644 --- a/xtask/src/builder.rs +++ b/xtask/src/builder.rs @@ -259,7 +259,7 @@ impl Builder { } /// test if a feature is present pub fn has_feature(&self, feature: &str) -> bool { - self.features.contains(feature) + self.features.contains(&feature.to_string()) } /// add a feature to be passed on to just the loader pub fn add_loader_feature<'a>(&'a mut self, feature: &str) -> &'a mut Builder { diff --git a/xtask/src/main.rs b/xtask/src/main.rs index e1e5794ec..199cfe68a 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -273,7 +273,7 @@ fn main() -> Result<(), Box> { } Some("perf-image") => { // `--feature vaultperf` will make `vault` the performance manager, in exclusion of shellchat - if !build.contains("shellperf") && !builder.contains("vaultperf") { + if !builder.has_feature("shellperf") && !builder.has_feature("vaultperf") { // select `shellchat` as the performance manager by default. builder.add_feature("shellperf"); }