about summary refs log tree commit diff
path: root/library/test/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/test/src/lib.rs')
-rw-r--r--library/test/src/lib.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs
index b40b6009ea4..0bd447552cf 100644
--- a/library/test/src/lib.rs
+++ b/library/test/src/lib.rs
@@ -183,8 +183,7 @@ pub fn test_main_static_abort(tests: &[&TestDescAndFn]) {
 
         let test = tests
             .into_iter()
-            .filter(|test| test.desc.name.as_slice() == name)
-            .next()
+            .find(|test| test.desc.name.as_slice() == name)
             .unwrap_or_else(|| panic!("couldn't find a test with the provided name '{name}'"));
         let TestDescAndFn { desc, testfn } = test;
         match testfn.into_runnable() {