performance-metrics: avoid double ref in test selection

Use into_iter() for test_list when building tests_to_run.

This keeps the collected type as Vec<&PerformanceTest>.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-04-27 13:42:34 -07:00
committed by Rob Bradford
parent 63d6beb170
commit 3df0579866

View File

@@ -1868,8 +1868,8 @@ fn main() {
};
// Determine which tests will actually run.
let tests_to_run: Vec<&&PerformanceTest> = test_list
.iter()
let tests_to_run: Vec<&PerformanceTest> = test_list
.into_iter()
.filter(|t| test_filter.is_empty() || test_filter.iter().any(|&s| t.name.contains(s)))
.filter(|t| !test_exclude.iter().any(|&s| t.name.contains(s)))
.collect();