From dc477db757247d5184250bffe9dd0c38dd867778 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 23 Oct 2018 19:15:31 +0300 Subject: Introduce ModuleId Previously, module was synonym with a file, and so a module could have had several parents. This commit introduces a separate module concept, such that each module has only one parent, but a single file can correspond to different modules. --- crates/ra_analysis/src/symbol_index.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_analysis/src/symbol_index.rs') diff --git a/crates/ra_analysis/src/symbol_index.rs b/crates/ra_analysis/src/symbol_index.rs index a0f3c0437..1b7d9f779 100644 --- a/crates/ra_analysis/src/symbol_index.rs +++ b/crates/ra_analysis/src/symbol_index.rs @@ -34,7 +34,7 @@ impl Hash for SymbolIndex { } impl SymbolIndex { - pub(crate) fn for_files(files: impl ParallelIterator) -> SymbolIndex { + pub(crate) fn for_files(files: impl Iterator) -> SymbolIndex { let mut symbols = files .flat_map(|(file_id, file)| { file_symbols(&file) @@ -52,7 +52,7 @@ impl SymbolIndex { } pub(crate) fn for_file(file_id: FileId, file: File) -> SymbolIndex { - SymbolIndex::for_files(::rayon::iter::once((file_id, file))) + SymbolIndex::for_files(::std::iter::once((file_id, file))) } } -- cgit v1.2.3