diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-11 19:28:44 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-11 19:28:44 +0100 |
commit | 2ba6f18586d02a6dbc32e0bea88f7b4236277ea1 (patch) | |
tree | 59bccb90d4b311ffd5c6adc5934fae91c0fb7740 /crates/ra_analysis/src/lib.rs | |
parent | 77e9bf9b5fdcd4262e2d9badb42b912f5728d90b (diff) | |
parent | dc2b30e9b6084048e441765b91ef830a836d3dfc (diff) |
Merge #122
122: Use rustc-hash crate r=matklad a=mominul
Replace std's HashMap, HashSet with FxHashMap and FxHashSet.
Closes #121
Thanks!
Co-authored-by: Muhammad Mominul Huque <[email protected]>
Diffstat (limited to 'crates/ra_analysis/src/lib.rs')
-rw-r--r-- | crates/ra_analysis/src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs index f6ceb7eb2..849fd93e4 100644 --- a/crates/ra_analysis/src/lib.rs +++ b/crates/ra_analysis/src/lib.rs | |||
@@ -11,6 +11,7 @@ extern crate relative_path; | |||
11 | extern crate crossbeam_channel; | 11 | extern crate crossbeam_channel; |
12 | extern crate im; | 12 | extern crate im; |
13 | extern crate salsa; | 13 | extern crate salsa; |
14 | extern crate rustc_hash; | ||
14 | 15 | ||
15 | mod symbol_index; | 16 | mod symbol_index; |
16 | mod module_map; | 17 | mod module_map; |
@@ -23,13 +24,13 @@ mod descriptors; | |||
23 | 24 | ||
24 | use std::{ | 25 | use std::{ |
25 | sync::Arc, | 26 | sync::Arc, |
26 | collections::HashMap, | ||
27 | fmt::Debug, | 27 | fmt::Debug, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | use relative_path::{RelativePath, RelativePathBuf}; | 30 | use relative_path::{RelativePath, RelativePathBuf}; |
31 | use ra_syntax::{File, TextRange, TextUnit, AtomEdit}; | 31 | use ra_syntax::{File, TextRange, TextUnit, AtomEdit}; |
32 | use imp::{AnalysisImpl, AnalysisHostImpl, FileResolverImp}; | 32 | use imp::{AnalysisImpl, AnalysisHostImpl, FileResolverImp}; |
33 | use rustc_hash::FxHashMap; | ||
33 | 34 | ||
34 | pub use ra_editor::{ | 35 | pub use ra_editor::{ |
35 | StructureNode, LineIndex, FileSymbol, | 36 | StructureNode, LineIndex, FileSymbol, |
@@ -46,7 +47,7 @@ pub struct CrateId(pub u32); | |||
46 | 47 | ||
47 | #[derive(Debug, Clone, Default)] | 48 | #[derive(Debug, Clone, Default)] |
48 | pub struct CrateGraph { | 49 | pub struct CrateGraph { |
49 | pub crate_roots: HashMap<CrateId, FileId>, | 50 | pub crate_roots: FxHashMap<CrateId, FileId>, |
50 | } | 51 | } |
51 | 52 | ||
52 | pub trait FileResolver: Debug + Send + Sync + 'static { | 53 | pub trait FileResolver: Debug + Send + Sync + 'static { |