lsp: Don't log oneshot channel errors from notify (#29857)

This is kind of noisy and not very informative.

Release Notes:

- N/A
This commit is contained in:
Cole Miller 2025-05-05 08:21:45 -04:00 committed by GitHub
parent b404024c7a
commit c765da1c82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 14 deletions

View file

@ -1164,7 +1164,7 @@ impl LanguageServer {
id: NumberOrString::Number(id),
},
)
.log_err();
.ok();
}
});
@ -1234,7 +1234,7 @@ impl LanguageServer {
removed: vec![],
},
};
self.notify::<DidChangeWorkspaceFolders>(&params).log_err();
self.notify::<DidChangeWorkspaceFolders>(&params).ok();
}
}
/// Add new workspace folder to the list.
@ -1264,7 +1264,7 @@ impl LanguageServer {
}],
},
};
self.notify::<DidChangeWorkspaceFolders>(&params).log_err();
self.notify::<DidChangeWorkspaceFolders>(&params).ok();
}
}
pub fn set_workspace_folders(&self, folders: BTreeSet<Url>) {
@ -1293,7 +1293,7 @@ impl LanguageServer {
let params = DidChangeWorkspaceFoldersParams {
event: WorkspaceFoldersChangeEvent { added, removed },
};
self.notify::<DidChangeWorkspaceFolders>(&params).log_err();
self.notify::<DidChangeWorkspaceFolders>(&params).ok();
}
}
@ -1311,14 +1311,14 @@ impl LanguageServer {
self.notify::<notification::DidOpenTextDocument>(&DidOpenTextDocumentParams {
text_document: TextDocumentItem::new(uri, language_id, version, initial_text),
})
.log_err();
.ok();
}
pub fn unregister_buffer(&self, uri: Url) {
self.notify::<notification::DidCloseTextDocument>(&DidCloseTextDocumentParams {
text_document: TextDocumentIdentifier::new(uri),
})
.log_err();
.ok();
}
}