apply review feedback
This commit is contained in:
@@ -2605,27 +2605,11 @@ impl TargetOptions {
|
||||
}
|
||||
|
||||
pub(crate) fn has_feature(&self, search_feature: &str) -> bool {
|
||||
self.features.split(',').any(|f| {
|
||||
if let Some(f) = f.strip_prefix('+')
|
||||
&& f == search_feature
|
||||
{
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
})
|
||||
self.features.split(',').any(|f| f.strip_prefix('+').is_some_and(|f| f == search_feature))
|
||||
}
|
||||
|
||||
pub(crate) fn has_neg_feature(&self, search_feature: &str) -> bool {
|
||||
self.features.split(',').any(|f| {
|
||||
if let Some(f) = f.strip_prefix('-')
|
||||
&& f == search_feature
|
||||
{
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
})
|
||||
self.features.split(',').any(|f| f.strip_prefix('-').is_some_and(|f| f == search_feature))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user