refactor: use let else statement
This commit is contained in:
parent
54ff7a561f
commit
6db63d4632
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue