aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/change.rs
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/change.rs
parent3bdb456d17660f3460bbf2c38315568b2f76aaa5 (diff)
make source_root API more abstract
Diffstat (limited to 'crates/ra_ide_api/src/change.rs')
-rw-r--r--crates/ra_ide_api/src/change.rs4
1 files changed, 2 insertions, 2 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 }