mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 07:37:30 +00:00
Replace HashMap, HashSet with FxHashMap and FxHashSet
This commit is contained in:
parent
9b155c8976
commit
dc2b30e9b6
20 changed files with 68 additions and 49 deletions
|
@ -1,12 +1,13 @@
|
|||
extern crate relative_path;
|
||||
extern crate ra_analysis;
|
||||
extern crate rustc_hash;
|
||||
extern crate test_utils;
|
||||
|
||||
use std::{
|
||||
sync::Arc,
|
||||
collections::HashMap,
|
||||
};
|
||||
|
||||
use rustc_hash::FxHashMap;
|
||||
use relative_path::{RelativePath, RelativePathBuf};
|
||||
use ra_analysis::{Analysis, AnalysisHost, FileId, FileResolver, JobHandle, CrateGraph, CrateId};
|
||||
use test_utils::assert_eq_dbg;
|
||||
|
@ -131,7 +132,7 @@ fn test_resolve_crate_root() {
|
|||
|
||||
let crate_graph = CrateGraph {
|
||||
crate_roots: {
|
||||
let mut m = HashMap::new();
|
||||
let mut m = FxHashMap::default();
|
||||
m.insert(CrateId(1), FileId(1));
|
||||
m
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue