Skip to content

Commit 599492a

Browse files
committed
replace filter with skip and take
1 parent 1a8e0c3 commit 599492a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

build_system/src/test.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -979,12 +979,7 @@ where
979979
let start = current_part * count;
980980
let end = current_part * count + count;
981981
// We remove the files we don't want to test.
982-
for path in files
983-
.iter()
984-
.enumerate()
985-
.filter(|(pos, _)| *pos < start || *pos >= end)
986-
.map(|(_, path)| path)
987-
{
982+
for path in files.iter().skip(start).take(count) {
988983
remove_file(&rust_path.join(path))?;
989984
}
990985
}

0 commit comments

Comments
 (0)