diff options
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/change.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/symbol_index.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 0234c572d..89631935a 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs | |||
@@ -213,11 +213,11 @@ impl RootDatabase { | |||
213 | durability, | 213 | durability, |
214 | ); | 214 | ); |
215 | self.set_file_source_root_with_durability(add_file.file_id, root_id, durability); | 215 | self.set_file_source_root_with_durability(add_file.file_id, root_id, durability); |
216 | source_root.files.insert(add_file.path, add_file.file_id); | 216 | source_root.insert_file(add_file.path, add_file.file_id); |
217 | } | 217 | } |
218 | for remove_file in root_change.removed { | 218 | for remove_file in root_change.removed { |
219 | self.set_file_text_with_durability(remove_file.file_id, Default::default(), durability); | 219 | self.set_file_text_with_durability(remove_file.file_id, Default::default(), durability); |
220 | source_root.files.remove(&remove_file.path); | 220 | source_root.remove_file(&remove_file.path); |
221 | } | 221 | } |
222 | self.set_source_root_with_durability(root_id, Arc::new(source_root), durability); | 222 | self.set_source_root_with_durability(root_id, Arc::new(source_root), durability); |
223 | } | 223 | } |
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs index d4afddab4..a5729c368 100644 --- a/crates/ra_ide_api/src/symbol_index.rs +++ b/crates/ra_ide_api/src/symbol_index.rs | |||
@@ -87,7 +87,7 @@ pub(crate) fn world_symbols(db: &RootDatabase, query: Query) -> Vec<FileSymbol> | |||
87 | let mut files = Vec::new(); | 87 | let mut files = Vec::new(); |
88 | for &root in db.local_roots().iter() { | 88 | for &root in db.local_roots().iter() { |
89 | let sr = db.source_root(root); | 89 | let sr = db.source_root(root); |
90 | files.extend(sr.files.values().copied()) | 90 | files.extend(sr.walk()) |
91 | } | 91 | } |
92 | 92 | ||
93 | let snap = Snap(db.snapshot()); | 93 | let snap = Snap(db.snapshot()); |