Skip to content

Commit 749288e

Browse files
authored
Merge pull request #20096 from lnicola/silence-rustfmt-failed
internal: Don't show notifications on failed rustfmt calls
2 parents 01339d4 + 4c07f8b commit 749288e

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

crates/rust-analyzer/src/handlers/request.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,17 +2433,14 @@ fn run_rustfmt(
24332433
}
24342434
_ => {
24352435
// Something else happened - e.g. `rustfmt` is missing or caught a signal
2436-
Err(LspError::new(
2437-
-32900,
2438-
format!(
2439-
r#"rustfmt exited with:
2440-
Status: {}
2441-
stdout: {captured_stdout}
2442-
stderr: {captured_stderr}"#,
2443-
output.status,
2444-
),
2445-
)
2446-
.into())
2436+
tracing::error!(
2437+
?command,
2438+
%output.status,
2439+
%captured_stdout,
2440+
%captured_stderr,
2441+
"rustfmt failed"
2442+
);
2443+
Ok(None)
24472444
}
24482445
};
24492446
}

0 commit comments

Comments
 (0)