Get rid of rustc_hash
This commit is contained in:
parent
e04215802e
commit
abd6b3519c
3 changed files with 4 additions and 13 deletions
|
|
@ -1,11 +1,10 @@
|
|||
use std::{
|
||||
collections::hash_map::Entry,
|
||||
collections::{hash_map::Entry, HashMap},
|
||||
fs::File,
|
||||
io::{self, BufRead, BufReader, Seek},
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use rustc_hash::FxHashMap;
|
||||
use serde::Deserialize;
|
||||
use thousands::Separable;
|
||||
|
||||
|
|
@ -49,9 +48,9 @@ fn read_titles(r: &mut BufReader<File>) -> io::Result<Vec<String>> {
|
|||
fn compute_title_lookup(
|
||||
normalizer: &TitleNormalizer,
|
||||
titles: &[String],
|
||||
) -> FxHashMap<String, (u32, u32)> {
|
||||
) -> HashMap<String, (u32, u32)> {
|
||||
let mut counter = Counter::new();
|
||||
let mut title_lookup = FxHashMap::<String, (u32, u32)>::default();
|
||||
let mut title_lookup = HashMap::<String, (u32, u32)>::new();
|
||||
|
||||
for (sift_i, title) in titles.iter().enumerate() {
|
||||
counter.tick();
|
||||
|
|
@ -86,7 +85,7 @@ fn compute_title_lookup(
|
|||
|
||||
fn read_page_data(
|
||||
normalizer: &TitleNormalizer,
|
||||
title_lookup: &FxHashMap<String, (u32, u32)>,
|
||||
title_lookup: &HashMap<String, (u32, u32)>,
|
||||
r: &mut BufReader<File>,
|
||||
) -> io::Result<(Vec<Page>, Vec<Link>, Graph)> {
|
||||
let mut counter = Counter::new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue