aboutsummaryrefslogtreecommitdiff
path: root/crates/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/server/src')
-rw-r--r--crates/server/src/main_loop/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/server/src/main_loop/mod.rs b/crates/server/src/main_loop/mod.rs
index 52fc00c9c..bb1d638e0 100644
--- a/crates/server/src/main_loop/mod.rs
+++ b/crates/server/src/main_loop/mod.rs
@@ -130,7 +130,7 @@ fn main_loop_inner(
130 Event::Ws(ws) => { 130 Event::Ws(ws) => {
131 match ws { 131 match ws {
132 Ok(ws) => { 132 Ok(ws) => {
133 let not = RawNotification::new::<req::DidReloadWorkspace>(vec![ws.clone()]); 133 let not = RawNotification::new::<req::DidReloadWorkspace>(&vec![ws.clone()]);
134 msg_sender.send(RawMessage::Notification(not)); 134 msg_sender.send(RawMessage::Notification(not));
135 state.set_workspaces(vec![ws]); 135 state.set_workspaces(vec![ws]);
136 state_changed = true; 136 state_changed = true;
@@ -288,7 +288,7 @@ fn on_notification(
288 let file_id = state.remove_mem_file(path.as_path())?; 288 let file_id = state.remove_mem_file(path.as_path())?;
289 subs.remove_sub(file_id); 289 subs.remove_sub(file_id);
290 let params = req::PublishDiagnosticsParams { uri, diagnostics: Vec::new() }; 290 let params = req::PublishDiagnosticsParams { uri, diagnostics: Vec::new() };
291 let not = RawNotification::new::<req::PublishDiagnostics>(params); 291 let not = RawNotification::new::<req::PublishDiagnostics>(&params);
292 msg_sender.send(RawMessage::Notification(not)); 292 msg_sender.send(RawMessage::Notification(not));
293 return Ok(()) 293 return Ok(())
294 } 294 }
@@ -326,7 +326,7 @@ impl<'a> PoolDispatcher<'a> {
326 let sender = self.sender.clone(); 326 let sender = self.sender.clone();
327 self.pool.execute(move || { 327 self.pool.execute(move || {
328 let resp = match f(world, params, token) { 328 let resp = match f(world, params, token) {
329 Ok(resp) => RawResponse::ok::<R>(id, resp), 329 Ok(resp) => RawResponse::ok::<R>(id, &resp),
330 Err(e) => RawResponse::err(id, ErrorCode::InternalError as i32, e.to_string()), 330 Err(e) => RawResponse::err(id, ErrorCode::InternalError as i32, e.to_string()),
331 }; 331 };
332 let task = Task::Respond(resp); 332 let task = Task::Respond(resp);
@@ -363,7 +363,7 @@ fn update_file_notifications_on_threadpool(
363 error!("failed to compute diagnostics: {:?}", e) 363 error!("failed to compute diagnostics: {:?}", e)
364 } 364 }
365 Ok(params) => { 365 Ok(params) => {
366 let not = RawNotification::new::<req::PublishDiagnostics>(params); 366 let not = RawNotification::new::<req::PublishDiagnostics>(&params);
367 sender.send(Task::Notify(not)); 367 sender.send(Task::Notify(not));
368 } 368 }
369 } 369 }
@@ -372,7 +372,7 @@ fn update_file_notifications_on_threadpool(
372 error!("failed to compute decorations: {:?}", e) 372 error!("failed to compute decorations: {:?}", e)
373 } 373 }
374 Ok(params) => { 374 Ok(params) => {
375 let not = RawNotification::new::<req::PublishDecorations>(params); 375 let not = RawNotification::new::<req::PublishDecorations>(&params);
376 sender.send(Task::Notify(not)) 376 sender.send(Task::Notify(not))
377 } 377 }
378 } 378 }