diff options
author | Aleksey Kladov <[email protected]> | 2018-10-15 20:05:21 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-15 20:05:21 +0100 |
commit | 76c51fae77d5dc2d7791132ecc78e444118e48de (patch) | |
tree | 1254d9c85ef4ff811d8a5c687face9d130cdf31d /crates/ra_analysis/src/roots.rs | |
parent | 8c88900fa9ecc71fdd58254d3f29b66912a56bd4 (diff) |
Tweak writable root API
Diffstat (limited to 'crates/ra_analysis/src/roots.rs')
-rw-r--r-- | crates/ra_analysis/src/roots.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/ra_analysis/src/roots.rs b/crates/ra_analysis/src/roots.rs index 766548c70..42833af36 100644 --- a/crates/ra_analysis/src/roots.rs +++ b/crates/ra_analysis/src/roots.rs | |||
@@ -35,10 +35,10 @@ pub(crate) struct WritableSourceRoot { | |||
35 | 35 | ||
36 | impl WritableSourceRoot { | 36 | impl WritableSourceRoot { |
37 | pub fn apply_changes( | 37 | pub fn apply_changes( |
38 | &self, | 38 | &mut self, |
39 | changes: &mut dyn Iterator<Item=(FileId, Option<String>)>, | 39 | changes: &mut dyn Iterator<Item=(FileId, Option<String>)>, |
40 | file_resolver: Option<FileResolverImp>, | 40 | file_resolver: Option<FileResolverImp>, |
41 | ) -> WritableSourceRoot { | 41 | ) { |
42 | let db = self.db.write(); | 42 | let db = self.db.write(); |
43 | let mut changed = FxHashSet::default(); | 43 | let mut changed = FxHashSet::default(); |
44 | let mut removed = FxHashSet::default(); | 44 | let mut removed = FxHashSet::default(); |
@@ -65,9 +65,6 @@ impl WritableSourceRoot { | |||
65 | let resolver = file_resolver.unwrap_or_else(|| file_set.resolver.clone()); | 65 | let resolver = file_resolver.unwrap_or_else(|| file_set.resolver.clone()); |
66 | db.query(db::FileSetQuery) | 66 | db.query(db::FileSetQuery) |
67 | .set((), Arc::new(db::FileSet { files, resolver })); | 67 | .set((), Arc::new(db::FileSet { files, resolver })); |
68 | // TODO: reconcile sasla's API with our needs | ||
69 | // https://github.com/salsa-rs/salsa/issues/12 | ||
70 | self.clone() | ||
71 | } | 68 | } |
72 | } | 69 | } |
73 | 70 | ||