diff options
-rw-r--r-- | crates/rust-analyzer/src/handlers.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs index e73b3a211..82f6de5da 100644 --- a/crates/rust-analyzer/src/handlers.rs +++ b/crates/rust-analyzer/src/handlers.rs | |||
@@ -709,11 +709,6 @@ pub(crate) fn handle_formatting( | |||
709 | } | 709 | } |
710 | }; | 710 | }; |
711 | 711 | ||
712 | if let Ok(path) = params.text_document.uri.to_file_path() { | ||
713 | if let Some(parent) = path.parent() { | ||
714 | rustfmt.current_dir(parent); | ||
715 | } | ||
716 | } | ||
717 | let mut rustfmt = rustfmt.stdin(Stdio::piped()).stdout(Stdio::piped()).spawn()?; | 712 | let mut rustfmt = rustfmt.stdin(Stdio::piped()).stdout(Stdio::piped()).spawn()?; |
718 | 713 | ||
719 | rustfmt.stdin.as_mut().unwrap().write_all(file.as_bytes())?; | 714 | rustfmt.stdin.as_mut().unwrap().write_all(file.as_bytes())?; |