mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Rob Bradford
parent
63d6beb170
commit
3df0579866
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user