aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index 452499497..e6a7dc641 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -78,7 +78,6 @@ pub fn main_loop(
78 let pool = ThreadPool::new(THREADPOOL_SIZE); 78 let pool = ThreadPool::new(THREADPOOL_SIZE);
79 let (task_sender, task_receiver) = unbounded::<Task>(); 79 let (task_sender, task_receiver) = unbounded::<Task>();
80 let mut pending_requests = PendingRequests::default(); 80 let mut pending_requests = PendingRequests::default();
81 let mut subs = Subscriptions::default();
82 81
83 log::info!("server initialized, serving requests"); 82 log::info!("server initialized, serving requests");
84 let main_res = main_loop_inner( 83 let main_res = main_loop_inner(
@@ -90,7 +89,6 @@ pub fn main_loop(
90 task_receiver.clone(), 89 task_receiver.clone(),
91 &mut state, 90 &mut state,
92 &mut pending_requests, 91 &mut pending_requests,
93 &mut subs,
94 ); 92 );
95 93
96 log::info!("waiting for tasks to finish..."); 94 log::info!("waiting for tasks to finish...");
@@ -165,8 +163,8 @@ fn main_loop_inner(
165 task_receiver: Receiver<Task>, 163 task_receiver: Receiver<Task>,
166 state: &mut ServerWorldState, 164 state: &mut ServerWorldState,
167 pending_requests: &mut PendingRequests, 165 pending_requests: &mut PendingRequests,
168 subs: &mut Subscriptions,
169) -> Result<()> { 166) -> Result<()> {
167 let mut subs = Subscriptions::default();
170 // We try not to index more than MAX_IN_FLIGHT_LIBS libraries at the same 168 // We try not to index more than MAX_IN_FLIGHT_LIBS libraries at the same
171 // time to always have a thread ready to react to input. 169 // time to always have a thread ready to react to input.
172 let mut in_flight_libraries = 0; 170 let mut in_flight_libraries = 0;
@@ -230,7 +228,7 @@ fn main_loop_inner(
230 )? 228 )?
231 } 229 }
232 RawMessage::Notification(not) => { 230 RawMessage::Notification(not) => {
233 on_notification(msg_sender, state, pending_requests, subs, not)?; 231 on_notification(msg_sender, state, pending_requests, &mut subs, not)?;
234 state_changed = true; 232 state_changed = true;
235 } 233 }
236 RawMessage::Response(resp) => log::error!("unexpected response: {:?}", resp), 234 RawMessage::Response(resp) => log::error!("unexpected response: {:?}", resp),