mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +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
|
@ -11,6 +11,7 @@ extern crate relative_path;
|
|||
extern crate crossbeam_channel;
|
||||
extern crate im;
|
||||
extern crate salsa;
|
||||
extern crate rustc_hash;
|
||||
|
||||
mod symbol_index;
|
||||
mod module_map;
|
||||
|
@ -23,13 +24,13 @@ mod descriptors;
|
|||
|
||||
use std::{
|
||||
sync::Arc,
|
||||
collections::HashMap,
|
||||
fmt::Debug,
|
||||
};
|
||||
|
||||
use relative_path::{RelativePath, RelativePathBuf};
|
||||
use ra_syntax::{File, TextRange, TextUnit, AtomEdit};
|
||||
use imp::{AnalysisImpl, AnalysisHostImpl, FileResolverImp};
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
pub use ra_editor::{
|
||||
StructureNode, LineIndex, FileSymbol,
|
||||
|
@ -46,7 +47,7 @@ pub struct CrateId(pub u32);
|
|||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct CrateGraph {
|
||||
pub crate_roots: HashMap<CrateId, FileId>,
|
||||
pub crate_roots: FxHashMap<CrateId, FileId>,
|
||||
}
|
||||
|
||||
pub trait FileResolver: Debug + Send + Sync + 'static {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue