refactor: check for is_none

Co-authored-by: TornaxO7 <tornax@proton.me>
This commit is contained in:
Nikita Revenco 2024-12-23 13:36:59 +00:00 committed by GitHub
parent 5f59c191f5
commit 54ff7a561f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1120,9 +1120,8 @@ impl Client {
text_document: lsp::TextDocumentIdentifier,
work_done_token: Option<lsp::ProgressToken>,
) -> Option<impl Future<Output = Result<Value>>> {
match self.capabilities.get().unwrap().color_provider {
Some(_) => (),
_ => return None,
if self.capabilities.get().unwrap().color_provider.is_none() {
return None;
}
let params = lsp::DocumentColorParams {