From 4dfb454d8a52d9d05fe79c90d52b4c57a6676225 Mon Sep 17 00:00:00 2001 From: rvcas Date: Tue, 13 Dec 2022 10:25:55 -0500 Subject: [PATCH] refactor: change match to if matches! --- crates/project/src/lib.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/project/src/lib.rs b/crates/project/src/lib.rs index 8ebec612..16192840 100644 --- a/crates/project/src/lib.rs +++ b/crates/project/src/lib.rs @@ -534,13 +534,8 @@ where for test in tests { let path = format!("{}{}", test.module, test.name); - match match_tests.clone() { - None => {} - Some(search_str) => { - if !path.to_string().contains(&search_str) { - continue; - } - } + if matches!(&match_tests, Some(search_str) if !path.to_string().contains(search_str)) { + continue; } match test.program.eval(initial_budget) {