about summary refs log tree commit diff
diff options
context:
space:
mode:
authorliewyec <ondrej.hojdysz@gmail.com>2024-01-20 13:30:51 +0100
committerliewyec <ondrej.hojdysz@gmail.com>2024-01-21 09:22:32 +0100
commit599492a3d594312f59d051240e573176bd1df2ab (patch)
tree5a1a769f26e72fea580bbf9d391dc54b6facdc5f
parent1a8e0c39fac364211a92ace4f872f6091518bd50 (diff)
downloadrust-599492a3d594312f59d051240e573176bd1df2ab.tar.gz
rust-599492a3d594312f59d051240e573176bd1df2ab.zip
replace filter with skip and take
-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 1577cbf2b53..e7325d5e71f 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))?;
         }
     }