From 599492a3d594312f59d051240e573176bd1df2ab Mon Sep 17 00:00:00 2001 From: liewyec Date: Sat, 20 Jan 2024 13:30:51 +0100 Subject: [PATCH] replace filter with skip and take --- build_system/src/test.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/build_system/src/test.rs b/build_system/src/test.rs index 1577cbf2b53e..e7325d5e71fe 100644 --- a/build_system/src/test.rs +++ b/build_system/src/test.rs @@ -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))?; } }