fix: Swallow rustfmt parsing panics
This commit is contained in:
parent
536eea39e8
commit
e6fbb5c8e6
1 changed files with 4 additions and 0 deletions
|
@ -2352,6 +2352,10 @@ fn run_rustfmt(
|
||||||
);
|
);
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
// rustfmt panicked at lexing/parsing the file
|
||||||
|
Some(101) if !rustfmt_not_installed && captured_stderr.starts_with("error[") => {
|
||||||
|
Ok(None)
|
||||||
|
}
|
||||||
_ => {
|
_ => {
|
||||||
// Something else happened - e.g. `rustfmt` is missing or caught a signal
|
// Something else happened - e.g. `rustfmt` is missing or caught a signal
|
||||||
Err(LspError::new(
|
Err(LspError::new(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue