Skip to content

Commit e4f7aed

Browse files
committed
index/features: Simplify type declarations
1 parent 57b460d commit e4f7aed

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

crates/crates_io_index/features.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,16 @@ pub fn split_features(
1313

1414
// First, we partition the features into two groups: those that use the new
1515
// features syntax (`features2`) and those that don't (`features`).
16-
let (mut features, mut features2) =
17-
features
18-
.into_iter()
19-
.partition::<FeaturesMap, _>(|(_k, vals)| {
20-
!vals.iter().map(String::as_ref).any(has_features2_syntax)
21-
});
16+
let (mut features, mut features2): (FeaturesMap, FeaturesMap) = features
17+
.into_iter()
18+
.partition(|(_k, vals)| !vals.iter().map(String::as_ref).any(has_features2_syntax));
2219

2320
// Then, we recursively move features from `features` to `features2` if they
2421
// depend on features in `features2`.
2522
for i in (0..ITERATION_LIMIT).rev() {
2623
let split = features
2724
.into_iter()
28-
.partition::<FeaturesMap, _>(|(_k, vals)| {
29-
!vals.iter().any(|v| features2.contains_key(v))
30-
});
25+
.partition(|(_k, vals)| !vals.iter().any(|v| features2.contains_key(v)));
3126

3227
features = split.0;
3328

0 commit comments

Comments
 (0)