aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index 07579be12..ecfa42206 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -625,7 +625,10 @@ pub fn handle_formatting(
625 let output = rustfmt.wait_with_output()?; 625 let output = rustfmt.wait_with_output()?;
626 let captured_stdout = String::from_utf8(output.stdout)?; 626 let captured_stdout = String::from_utf8(output.stdout)?;
627 if !output.status.success() { 627 if !output.status.success() {
628 return Err(failure::err_msg(captured_stdout)); 628 return Err(failure::err_msg(format!(
629 "rustfmt exited with error code {}: {}.",
630 output.status, captured_stdout
631 )));
629 } 632 }
630 633
631 Ok(Some(vec![TextEdit { 634 Ok(Some(vec![TextEdit {