diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs index 47c4be20..d19f021b 100644 --- a/helix-term/src/commands/lsp.rs +++ b/helix-term/src/commands/lsp.rs @@ -1461,9 +1461,8 @@ fn compute_color_swatches_for_view( } // Add annotations to relevant document, not the current one (it may have changed in between) - let doc = match editor.documents.get_mut(&doc_id) { - Some(doc) => doc, - None => return, + let Some(doc) = editor.documents.get_mut(&doc_id) else { + return; }; // If we have neither color swatches nor an LSP, empty the color swatches since they're now oudated