From 3e83a521e45fb6221099673f6d295f0e59b0ecf2 Mon Sep 17 00:00:00 2001 From: y21 <30553356+y21@users.noreply.github.com> Date: Wed, 15 Nov 2023 15:17:38 +0100 Subject: [PATCH] replace `Vec` with slice in lintcheck --- lintcheck/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lintcheck/src/main.rs b/lintcheck/src/main.rs index 58cb42316fd..841b605f5fb 100644 --- a/lintcheck/src/main.rs +++ b/lintcheck/src/main.rs @@ -309,7 +309,7 @@ impl Crate { target_dir_index: &AtomicUsize, total_crates_to_lint: usize, config: &LintcheckConfig, - lint_filter: &Vec, + lint_filter: &[String], server: &Option, ) -> Vec { // advance the atomic index by one @@ -728,7 +728,7 @@ fn read_stats_from_file(file_path: &Path) -> HashMap { } /// print how lint counts changed between runs -fn print_stats(old_stats: HashMap, new_stats: HashMap<&String, usize>, lint_filter: &Vec) { +fn print_stats(old_stats: HashMap, new_stats: HashMap<&String, usize>, lint_filter: &[String]) { let same_in_both_hashmaps = old_stats .iter() .filter(|(old_key, old_val)| new_stats.get::<&String>(old_key) == Some(old_val))