From 1b70801861d2a346148a1ea5abb3dec4a8bc28b1 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 23 Oct 2022 23:20:08 +0800 Subject: [PATCH] fix some typos --- xtask/src/builder.rs | 2 +- xtask/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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"); }