aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index fe6b360d4..aeb8a2299 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -399,8 +399,7 @@ fn on_notification(
399 Ok(mut params) => { 399 Ok(mut params) => {
400 let uri = params.text_document.uri; 400 let uri = params.text_document.uri;
401 let path = uri.to_file_path().map_err(|()| format!("invalid uri: {}", uri))?; 401 let path = uri.to_file_path().map_err(|()| format!("invalid uri: {}", uri))?;
402 let text = 402 let text = params.content_changes.pop().ok_or_else(|| format!("empty changes"))?.text;
403 params.content_changes.pop().ok_or_else(|| format!("empty changes"))?.text;
404 state.vfs.write().change_file_overlay(path.as_path(), text); 403 state.vfs.write().change_file_overlay(path.as_path(), text);
405 return Ok(()); 404 return Ok(());
406 } 405 }
@@ -548,11 +547,7 @@ where
548 error: None, 547 error: None,
549 } 548 }
550 } else { 549 } else {
551 RawResponse::err( 550 RawResponse::err(id, ErrorCode::InternalError as i32, e.to_string())
552 id,
553 ErrorCode::InternalError as i32,
554 e.to_string()
555 )
556 } 551 }
557 } 552 }
558 }, 553 },