diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-04 09:54:07 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-04 09:54:07 +0100 |
commit | 8ee8542de23253ec29f1b817aeb975313875885d (patch) | |
tree | d72726979063b4856cd328e34c36a1e26e6ed944 /crates/ra_ide_api | |
parent | 11cc8024a1897a0c844a1f7aca4b20ee34b95b50 (diff) | |
parent | 6c63a59425e256ce46d058807b64149297231982 (diff) |
Merge #1231
1231: eagarly clean astd maps r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/change.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 5bfdbe7e9..16b9ef3d5 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs | |||
@@ -186,6 +186,7 @@ impl RootDatabase { | |||
186 | if let Some(crate_graph) = change.crate_graph { | 186 | if let Some(crate_graph) = change.crate_graph { |
187 | self.set_crate_graph(Arc::new(crate_graph)) | 187 | self.set_crate_graph(Arc::new(crate_graph)) |
188 | } | 188 | } |
189 | self.collect_after_change() | ||
189 | } | 190 | } |
190 | 191 | ||
191 | fn apply_root_change(&mut self, root_id: SourceRootId, root_change: RootChange) { | 192 | fn apply_root_change(&mut self, root_id: SourceRootId, root_change: RootChange) { |
@@ -228,4 +229,9 @@ impl RootDatabase { | |||
228 | self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep); | 229 | self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep); |
229 | self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep); | 230 | self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep); |
230 | } | 231 | } |
232 | |||
233 | pub(crate) fn collect_after_change(&mut self) { | ||
234 | let sweep = SweepStrategy::default().discard_everything().sweep_all_revisions(); | ||
235 | self.query(hir::db::AstIdToNodeQuery).sweep(sweep) | ||
236 | } | ||
231 | } | 237 | } |