Skip to content

Commit

Permalink
replace Vec with slice in lintcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
y21 committed Nov 15, 2023
1 parent bb69461 commit 3e83a52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lintcheck/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ impl Crate {
target_dir_index: &AtomicUsize,
total_crates_to_lint: usize,
config: &LintcheckConfig,
lint_filter: &Vec<String>,
lint_filter: &[String],
server: &Option<LintcheckServer>,
) -> Vec<ClippyWarning> {
// advance the atomic index by one
Expand Down Expand Up @@ -728,7 +728,7 @@ fn read_stats_from_file(file_path: &Path) -> HashMap<String, usize> {
}

/// print how lint counts changed between runs
fn print_stats(old_stats: HashMap<String, usize>, new_stats: HashMap<&String, usize>, lint_filter: &Vec<String>) {
fn print_stats(old_stats: HashMap<String, usize>, 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))
Expand Down

0 comments on commit 3e83a52

Please sign in to comment.