aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server
diff options
context:
space:
mode:
authorMuhammad Mominul Huque <[email protected]>2019-06-15 08:37:15 +0100
committerMuhammad Mominul Huque <[email protected]>2019-06-15 08:37:15 +0100
commitebb40c7f87d58fb74c8f3b4dfcb2704140599d65 (patch)
treea5446456867754ef3bd533f3b54c7ea1022f9cc4 /crates/ra_lsp_server
parentf032eeb05f0b7d77e30cd6c5eea016cc5d649e3f (diff)
cargo format
Diffstat (limited to 'crates/ra_lsp_server')
-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 },