diff options
author | Aleksey Kladov <[email protected]> | 2018-10-24 14:13:17 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-24 14:13:17 +0100 |
commit | 44c8ddf885daaecfa4785e100ac1b065126c05b7 (patch) | |
tree | 1852cf05df754530636d58797e24f583e32617d2 /crates/ra_analysis/src/symbol_index.rs | |
parent | b636d23bec0dcc6f85595787b8295c24df2bacfe (diff) |
make indexing parallel again
Diffstat (limited to 'crates/ra_analysis/src/symbol_index.rs')
-rw-r--r-- | crates/ra_analysis/src/symbol_index.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/symbol_index.rs b/crates/ra_analysis/src/symbol_index.rs index 1b7d9f779..e5c8d8870 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 { | |||
34 | } | 34 | } |
35 | 35 | ||
36 | impl SymbolIndex { | 36 | impl SymbolIndex { |
37 | pub(crate) fn for_files(files: impl Iterator<Item = (FileId, File)>) -> SymbolIndex { | 37 | pub(crate) fn for_files(files: impl ParallelIterator<Item = (FileId, File)>) -> SymbolIndex { |
38 | let mut symbols = files | 38 | let mut symbols = files |
39 | .flat_map(|(file_id, file)| { | 39 | .flat_map(|(file_id, file)| { |
40 | file_symbols(&file) | 40 | file_symbols(&file) |
@@ -52,7 +52,7 @@ impl SymbolIndex { | |||
52 | } | 52 | } |
53 | 53 | ||
54 | pub(crate) fn for_file(file_id: FileId, file: File) -> SymbolIndex { | 54 | pub(crate) fn for_file(file_id: FileId, file: File) -> SymbolIndex { |
55 | SymbolIndex::for_files(::std::iter::once((file_id, file))) | 55 | SymbolIndex::for_files(rayon::iter::once((file_id, file))) |
56 | } | 56 | } |
57 | } | 57 | } |
58 | 58 | ||