about summary refs log tree commit diff
diff options
context:
space:
mode:
authorantoyo <antoyo@users.noreply.github.com>2024-02-01 09:10:38 -0500
committerGitHub <noreply@github.com>2024-02-01 09:10:38 -0500
commit2a36f58475ce6b2bcf7d5e619af2c4875698f9fb (patch)
tree1b3d58746661a7a1bbf53e44b29fca98fa38e68b
parente747d42bfd76029298e956afc799c976ec1bc6d7 (diff)
parent599492a3d594312f59d051240e573176bd1df2ab (diff)
downloadrust-2a36f58475ce6b2bcf7d5e619af2c4875698f9fb.tar.gz
rust-2a36f58475ce6b2bcf7d5e619af2c4875698f9fb.zip
Merge pull request #416 from Liewyec/feature/improve-iterator-for-file-suppression
Improve iterator for files suppression
-rw-r--r--build_system/src/test.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/build_system/src/test.rs b/build_system/src/test.rs
index 5451b7f1a07..44c003d8f75 100644
--- a/build_system/src/test.rs
+++ b/build_system/src/test.rs
@@ -990,12 +990,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))?;
         }
     }