mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
Merge #903
903: Work around for issue in vscode reporting a failure in request r=matklad a=vipentti vscode would report "A request has failed" when it got "Content modified" message and this would cause a pop-up to appear. This works around the issue by returning an "empty" response that vscode can ignore. Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
This commit is contained in:
commit
c8e78809e5
@ -416,11 +416,20 @@ impl<'a> PoolDispatcher<'a> {
|
||||
}
|
||||
Err(e) => {
|
||||
if is_canceled(&e) {
|
||||
RawResponse::err(
|
||||
// FIXME: When https://github.com/Microsoft/vscode-languageserver-node/issues/457
|
||||
// gets fixed, we can return the proper response.
|
||||
// This works around the issue where "content modified" error would continuously
|
||||
// show an message pop-up in VsCode
|
||||
// RawResponse::err(
|
||||
// id,
|
||||
// ErrorCode::ContentModified as i32,
|
||||
// "content modified".to_string(),
|
||||
// )
|
||||
RawResponse {
|
||||
id,
|
||||
ErrorCode::ContentModified as i32,
|
||||
"content modified".to_string(),
|
||||
)
|
||||
result: Some(serde_json::to_value(&()).unwrap()),
|
||||
error: None,
|
||||
}
|
||||
} else {
|
||||
RawResponse::err(
|
||||
id,
|
||||
|
Loading…
Reference in New Issue
Block a user