diff options
author | Aleksey Kladov <[email protected]> | 2018-10-25 15:59:03 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-25 15:59:03 +0100 |
commit | 363adf07b7763cfe7e13fac0ee148361d51834e4 (patch) | |
tree | 7b6ea86855fe34c3d45d14262c8cf94e315566e8 /crates/ra_analysis/src | |
parent | d19001957172287afee90bd4fc3d037d2ce6f5dd (diff) |
restore symbols filtering
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 69f5ed330..5a6e2450d 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -181,11 +181,14 @@ impl AnalysisImpl { | |||
181 | } | 181 | } |
182 | pub fn world_symbols(&self, query: Query) -> Cancelable<Vec<(FileId, FileSymbol)>> { | 182 | pub fn world_symbols(&self, query: Query) -> Cancelable<Vec<(FileId, FileSymbol)>> { |
183 | let mut buf = Vec::new(); | 183 | let mut buf = Vec::new(); |
184 | for &lib_id in self.db.libraries().iter() { | 184 | if query.libs { |
185 | buf.push(self.db.library_symbols(lib_id)); | 185 | for &lib_id in self.db.libraries().iter() { |
186 | } | 186 | buf.push(self.db.library_symbols(lib_id)); |
187 | for &file_id in self.db.source_root(WORKSPACE).files.iter() { | 187 | } |
188 | buf.push(self.db.file_symbols(file_id)?); | 188 | } else { |
189 | for &file_id in self.db.source_root(WORKSPACE).files.iter() { | ||
190 | buf.push(self.db.file_symbols(file_id)?); | ||
191 | } | ||
189 | } | 192 | } |
190 | Ok(query.search(&buf)) | 193 | Ok(query.search(&buf)) |
191 | } | 194 | } |