diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_ide_api/src/change.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 16b9ef3d5..dc6a433c4 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs | |||
@@ -186,7 +186,6 @@ 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() | ||
190 | } | 189 | } |
191 | 190 | ||
192 | fn apply_root_change(&mut self, root_id: SourceRootId, root_change: RootChange) { | 191 | fn apply_root_change(&mut self, root_id: SourceRootId, root_change: RootChange) { |
@@ -216,6 +215,7 @@ impl RootDatabase { | |||
216 | } | 215 | } |
217 | 216 | ||
218 | pub(crate) fn collect_garbage(&mut self) { | 217 | pub(crate) fn collect_garbage(&mut self) { |
218 | let _p = profile("RootDatabase::collect_garbage"); | ||
219 | self.last_gc = time::Instant::now(); | 219 | self.last_gc = time::Instant::now(); |
220 | 220 | ||
221 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); | 221 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); |
@@ -229,9 +229,4 @@ impl RootDatabase { | |||
229 | self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep); | 229 | self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep); |
230 | self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep); | 230 | self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep); |
231 | } | 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 | } | ||
237 | } | 232 | } |