diff options
author | Aleksey Kladov <[email protected]> | 2019-05-31 17:24:33 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-05-31 17:24:33 +0100 |
commit | 838915c9a29987f7c62abfdc6ae0664c21de4b7f (patch) | |
tree | 351ab3cc47a348ce63c1b549f2d1bd723b4a0870 /crates | |
parent | 8bb02859e8656b57b90a95076f559003b015f39b (diff) |
simplify
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index 95b69cd6e..0184c8546 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs | |||
@@ -317,7 +317,7 @@ fn on_task( | |||
317 | match task { | 317 | match task { |
318 | Task::Respond(response) => { | 318 | Task::Respond(response) => { |
319 | if let Some(pending) = pending_requests.remove(&response.id) { | 319 | if let Some(pending) = pending_requests.remove(&response.id) { |
320 | let completed = CompletedRequest::from((response.id, pending)); | 320 | let completed = CompletedRequest::from(pending); |
321 | log::info!("handled req#{} in {:?}", completed.id, completed.duration); | 321 | log::info!("handled req#{} in {:?}", completed.id, completed.duration); |
322 | state.complete_request(completed); | 322 | state.complete_request(completed); |
323 | msg_sender.send(response.into()).unwrap(); | 323 | msg_sender.send(response.into()).unwrap(); |
@@ -371,8 +371,8 @@ fn on_request( | |||
371 | .finish(); | 371 | .finish(); |
372 | match req { | 372 | match req { |
373 | Ok(id) => { | 373 | Ok(id) => { |
374 | let prev = | 374 | let prev = pending_requests |
375 | pending_requests.insert(id, PendingRequest { method, received: request_received }); | 375 | .insert(id, PendingRequest { id, method, received: request_received }); |
376 | assert!(prev.is_none(), "duplicate request: {}", id); | 376 | assert!(prev.is_none(), "duplicate request: {}", id); |
377 | Ok(None) | 377 | Ok(None) |
378 | } | 378 | } |