From 761ba89ffd73498c3014d3b43b5bc0b4f592a284 Mon Sep 17 00:00:00 2001 From: Lukas Kalbertodt Date: Fri, 1 Nov 2019 13:43:44 +0100 Subject: [PATCH] Replace `array.into_iter()` with `iter()` in `libtest/tests.rs` --- src/libtest/tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libtest/tests.rs b/src/libtest/tests.rs index 9de774555e9cc..e0e211444cff5 100644 --- a/src/libtest/tests.rs +++ b/src/libtest/tests.rs @@ -269,7 +269,7 @@ fn time_test_failure_template(test_type: TestType) -> TestResult { fn test_error_on_exceed() { let types = [TestType::UnitTest, TestType::IntegrationTest, TestType::DocTest]; - for test_type in types.into_iter() { + for test_type in types.iter() { let result = time_test_failure_template(*test_type); assert_eq!(result, TestResult::TrTimedFail); @@ -320,7 +320,7 @@ fn test_time_options_threshold() { (TestType::DocTest, doc.critical.as_millis(), true, true), ]; - for (test_type, time, expected_warn, expected_critical) in test_vector.into_iter() { + for (test_type, time, expected_warn, expected_critical) in test_vector.iter() { let test_desc = typed_test_desc(*test_type); let exec_time = test_exec_time(*time as u64);