aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-09-05 20:36:04 +0100
committerAleksey Kladov <[email protected]>2019-09-06 12:21:11 +0100
commit9ae455ea52bf0bc60476fdb3d50d05f5873040c1 (patch)
tree5f5adc8ffd4c29d104e646057f636def67ac2549 /crates/ra_ide_api/src
parent3bdb456d17660f3460bbf2c38315568b2f76aaa5 (diff)
make source_root API more abstract
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/change.rs4
-rw-r--r--crates/ra_ide_api/src/symbol_index.rs2
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());