We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
has_features2_syntax()
1 parent 2eec9bb commit 57b460dCopy full SHA for 57b460d
crates/crates_io_index/features.rs
@@ -17,9 +17,7 @@ pub fn split_features(
17
features
18
.into_iter()
19
.partition::<FeaturesMap, _>(|(_k, vals)| {
20
- !vals
21
- .iter()
22
- .any(|v| v.starts_with("dep:") || v.contains("?/"))
+ !vals.iter().map(String::as_ref).any(has_features2_syntax)
23
});
24
25
// Then, we recursively move features from `features` to `features2` if they
@@ -47,6 +45,10 @@ pub fn split_features(
47
45
(features, features2)
48
46
}
49
+fn has_features2_syntax(s: &str) -> bool {
+ s.starts_with("dep:") || s.contains("?/")
50
+}
51
+
52
#[cfg(test)]
53
mod tests {
54
use super::*;
0 commit comments