diff options
Diffstat (limited to 'crates/rust-analyzer/src/main_loop.rs')
-rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index 386a47621..162c0057e 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs | |||
@@ -158,7 +158,7 @@ impl GlobalState { | |||
158 | } | 158 | } |
159 | Task::Unit => (), | 159 | Task::Unit => (), |
160 | } | 160 | } |
161 | self.maybe_collect_garbage(); | 161 | self.analysis_host.maybe_collect_garbage(); |
162 | } | 162 | } |
163 | Event::Vfs(task) => match task { | 163 | Event::Vfs(task) => match task { |
164 | vfs::loader::Message::Loaded { files } => { | 164 | vfs::loader::Message::Loaded { files } => { |
@@ -274,7 +274,7 @@ impl GlobalState { | |||
274 | self.req_queue.incoming.register(req.id.clone(), (req.method.clone(), request_received)); | 274 | self.req_queue.incoming.register(req.id.clone(), (req.method.clone(), request_received)); |
275 | 275 | ||
276 | RequestDispatcher { req: Some(req), global_state: self } | 276 | RequestDispatcher { req: Some(req), global_state: self } |
277 | .on_sync::<lsp_ext::CollectGarbage>(|s, ()| Ok(s.collect_garbage()))? | 277 | .on_sync::<lsp_ext::CollectGarbage>(|s, ()| Ok(s.analysis_host.collect_garbage()))? |
278 | .on_sync::<lsp_ext::JoinLines>(|s, p| handlers::handle_join_lines(s.snapshot(), p))? | 278 | .on_sync::<lsp_ext::JoinLines>(|s, p| handlers::handle_join_lines(s.snapshot(), p))? |
279 | .on_sync::<lsp_ext::OnEnter>(|s, p| handlers::handle_on_enter(s.snapshot(), p))? | 279 | .on_sync::<lsp_ext::OnEnter>(|s, p| handlers::handle_on_enter(s.snapshot(), p))? |
280 | .on_sync::<lsp_types::request::Shutdown>(|_, ()| Ok(()))? | 280 | .on_sync::<lsp_types::request::Shutdown>(|_, ()| Ok(()))? |