diff options
Diffstat (limited to 'crates/ra_analysis/src/roots.rs')
-rw-r--r-- | crates/ra_analysis/src/roots.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_analysis/src/roots.rs b/crates/ra_analysis/src/roots.rs index 1835a9b25..32a8c5bd0 100644 --- a/crates/ra_analysis/src/roots.rs +++ b/crates/ra_analysis/src/roots.rs | |||
@@ -1,11 +1,11 @@ | |||
1 | use std::{ | 1 | use std::{ |
2 | collections::HashMap, | ||
3 | sync::Arc, | 2 | sync::Arc, |
4 | panic, | 3 | panic, |
5 | }; | 4 | }; |
6 | 5 | ||
7 | use once_cell::sync::OnceCell; | 6 | use once_cell::sync::OnceCell; |
8 | use rayon::prelude::*; | 7 | use rayon::prelude::*; |
8 | use rustc_hash::FxHashMap; | ||
9 | use ra_editor::LineIndex; | 9 | use ra_editor::LineIndex; |
10 | use ra_syntax::File; | 10 | use ra_syntax::File; |
11 | 11 | ||
@@ -118,7 +118,7 @@ impl FileData { | |||
118 | #[derive(Debug)] | 118 | #[derive(Debug)] |
119 | pub(crate) struct ReadonlySourceRoot { | 119 | pub(crate) struct ReadonlySourceRoot { |
120 | symbol_index: Arc<SymbolIndex>, | 120 | symbol_index: Arc<SymbolIndex>, |
121 | file_map: HashMap<FileId, FileData>, | 121 | file_map: FxHashMap<FileId, FileData>, |
122 | module_tree: Arc<ModuleTreeDescriptor>, | 122 | module_tree: Arc<ModuleTreeDescriptor>, |
123 | } | 123 | } |
124 | 124 | ||
@@ -139,7 +139,7 @@ impl ReadonlySourceRoot { | |||
139 | let symbol_index = SymbolIndex::for_files( | 139 | let symbol_index = SymbolIndex::for_files( |
140 | modules.par_iter().map(|it| (it.0, it.1.clone())) | 140 | modules.par_iter().map(|it| (it.0, it.1.clone())) |
141 | ); | 141 | ); |
142 | let file_map: HashMap<FileId, FileData> = files | 142 | let file_map: FxHashMap<FileId, FileData> = files |
143 | .into_iter() | 143 | .into_iter() |
144 | .map(|(id, text)| (id, FileData::new(text))) | 144 | .map(|(id, text)| (id, FileData::new(text))) |
145 | .collect(); | 145 | .collect(); |