diff options
Diffstat (limited to 'crates/libanalysis/src')
-rw-r--r-- | crates/libanalysis/src/roots.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/libanalysis/src/roots.rs b/crates/libanalysis/src/roots.rs index f1bc72e33..6d1375f88 100644 --- a/crates/libanalysis/src/roots.rs +++ b/crates/libanalysis/src/roots.rs | |||
@@ -138,6 +138,11 @@ pub(crate) struct ReadonlySourceRoot { | |||
138 | impl ReadonlySourceRoot { | 138 | impl ReadonlySourceRoot { |
139 | pub fn new(files: Vec<(FileId, String)>) -> ReadonlySourceRoot { | 139 | pub fn new(files: Vec<(FileId, String)>) -> ReadonlySourceRoot { |
140 | let mut module_map = ModuleMap::new(); | 140 | let mut module_map = ModuleMap::new(); |
141 | let symbol_index = SymbolIndex::for_files( | ||
142 | files.par_iter().map(|(file_id, text)| { | ||
143 | (*file_id, File::parse(text)) | ||
144 | }) | ||
145 | ); | ||
141 | let file_map: HashMap<FileId, FileData> = files | 146 | let file_map: HashMap<FileId, FileData> = files |
142 | .into_iter() | 147 | .into_iter() |
143 | .map(|(id, text)| { | 148 | .map(|(id, text)| { |
@@ -145,11 +150,6 @@ impl ReadonlySourceRoot { | |||
145 | (id, FileData::new(text)) | 150 | (id, FileData::new(text)) |
146 | }) | 151 | }) |
147 | .collect(); | 152 | .collect(); |
148 | let symbol_index = SymbolIndex::for_files( | ||
149 | file_map.par_iter().map(|(&file_id, file_data)| { | ||
150 | (file_id, file_data.syntax_transient()) | ||
151 | }) | ||
152 | ); | ||
153 | 153 | ||
154 | ReadonlySourceRoot { | 154 | ReadonlySourceRoot { |
155 | symbol_index, | 155 | symbol_index, |