replace filter with skip and take
This commit is contained in:
parent
1a8e0c39fa
commit
599492a3d5
@ -979,12 +979,7 @@ where
|
||||
let start = current_part * count;
|
||||
let end = current_part * count + count;
|
||||
// We remove the files we don't want to test.
|
||||
for path in files
|
||||
.iter()
|
||||
.enumerate()
|
||||
.filter(|(pos, _)| *pos < start || *pos >= end)
|
||||
.map(|(_, path)| path)
|
||||
{
|
||||
for path in files.iter().skip(start).take(count) {
|
||||
remove_file(&rust_path.join(path))?;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user