Skip to content

Commit 331fd31

Browse files
committed
use FxHashMap
* add `rustc-hash` to cargo manifest * use `FxHashMap`
1 parent cfa007f commit 331fd31

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/tools/tidy/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ walkdir = "2"
1313
ignore = "0.4.18"
1414
semver = "1.0"
1515
termcolor = "1.1.3"
16+
rustc-hash = "1.1.0"
1617

1718
[[bin]]
1819
name = "rust-tidy"

src/tools/tidy/src/style.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919

2020
use crate::walk::{filter_dirs, walk};
2121
use regex::{Regex, RegexSet};
22-
use std::{collections::HashMap, ffi::OsStr, path::Path};
22+
use rustc_hash::FxHashMap;
23+
use std::{ffi::OsStr, path::Path};
2324

2425
/// Error code markdown is restricted to 80 columns because they can be
2526
/// displayed on the console with --example.
@@ -67,7 +68,7 @@ const ANNOTATIONS_TO_IGNORE: &[&str] = &[
6768

6869
fn generate_problems<'a>(
6970
consts: &'a [u32],
70-
letter_digit: &'a HashMap<char, char>,
71+
letter_digit: &'a FxHashMap<char, char>,
7172
) -> impl Iterator<Item = u32> + 'a {
7273
consts.iter().flat_map(move |const_value| {
7374
let problem =

0 commit comments

Comments
 (0)