aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/roots.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/roots.rs')
-rw-r--r--crates/ra_analysis/src/roots.rs6
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 @@
1use std::{ 1use std::{
2 collections::HashMap,
3 sync::Arc, 2 sync::Arc,
4 panic, 3 panic,
5}; 4};
6 5
7use once_cell::sync::OnceCell; 6use once_cell::sync::OnceCell;
8use rayon::prelude::*; 7use rayon::prelude::*;
8use rustc_hash::FxHashMap;
9use ra_editor::LineIndex; 9use ra_editor::LineIndex;
10use ra_syntax::File; 10use ra_syntax::File;
11 11
@@ -118,7 +118,7 @@ impl FileData {
118#[derive(Debug)] 118#[derive(Debug)]
119pub(crate) struct ReadonlySourceRoot { 119pub(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();