diff options
Diffstat (limited to 'crates/ra_analysis/src/symbol_index.rs')
-rw-r--r-- | crates/ra_analysis/src/symbol_index.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ra_analysis/src/symbol_index.rs b/crates/ra_analysis/src/symbol_index.rs index b57ad5d33..3a0667ecd 100644 --- a/crates/ra_analysis/src/symbol_index.rs +++ b/crates/ra_analysis/src/symbol_index.rs | |||
@@ -6,7 +6,7 @@ use std::{ | |||
6 | use fst::{self, Streamer}; | 6 | use fst::{self, Streamer}; |
7 | use ra_editor::{file_symbols, FileSymbol}; | 7 | use ra_editor::{file_symbols, FileSymbol}; |
8 | use ra_syntax::{ | 8 | use ra_syntax::{ |
9 | File, | 9 | SourceFileNode, |
10 | SyntaxKind::{self, *}, | 10 | SyntaxKind::{self, *}, |
11 | }; | 11 | }; |
12 | use rayon::prelude::*; | 12 | use rayon::prelude::*; |
@@ -34,7 +34,9 @@ impl Hash for SymbolIndex { | |||
34 | } | 34 | } |
35 | 35 | ||
36 | impl SymbolIndex { | 36 | impl SymbolIndex { |
37 | pub(crate) fn for_files(files: impl ParallelIterator<Item = (FileId, File)>) -> SymbolIndex { | 37 | pub(crate) fn for_files( |
38 | files: impl ParallelIterator<Item = (FileId, SourceFileNode)>, | ||
39 | ) -> SymbolIndex { | ||
38 | let mut symbols = files | 40 | let mut symbols = files |
39 | .flat_map(|(file_id, file)| { | 41 | .flat_map(|(file_id, file)| { |
40 | file_symbols(&file) | 42 | file_symbols(&file) |
@@ -51,7 +53,7 @@ impl SymbolIndex { | |||
51 | SymbolIndex { symbols, map } | 53 | SymbolIndex { symbols, map } |
52 | } | 54 | } |
53 | 55 | ||
54 | pub(crate) fn for_file(file_id: FileId, file: File) -> SymbolIndex { | 56 | pub(crate) fn for_file(file_id: FileId, file: SourceFileNode) -> SymbolIndex { |
55 | SymbolIndex::for_files(rayon::iter::once((file_id, file))) | 57 | SymbolIndex::for_files(rayon::iter::once((file_id, file))) |
56 | } | 58 | } |
57 | } | 59 | } |