From 4df965a002b5296fc728f1bc2fb9312fe421ea5d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 4 Sep 2018 04:13:22 +0300 Subject: work --- crates/libanalysis/src/roots.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/libanalysis/src') 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 { impl ReadonlySourceRoot { pub fn new(files: Vec<(FileId, String)>) -> ReadonlySourceRoot { let mut module_map = ModuleMap::new(); + let symbol_index = SymbolIndex::for_files( + files.par_iter().map(|(file_id, text)| { + (*file_id, File::parse(text)) + }) + ); let file_map: HashMap = files .into_iter() .map(|(id, text)| { @@ -145,11 +150,6 @@ impl ReadonlySourceRoot { (id, FileData::new(text)) }) .collect(); - let symbol_index = SymbolIndex::for_files( - file_map.par_iter().map(|(&file_id, file_data)| { - (file_id, file_data.syntax_transient()) - }) - ); ReadonlySourceRoot { symbol_index, -- cgit v1.2.3