perf: do not use unnecessary clone

This commit is contained in:
Nikita Revenco 2024-12-19 15:55:22 +00:00
parent 22259e3a8c
commit f1281b1634

View file

@ -83,8 +83,7 @@ impl menu::Item for CompletionItem {
Some(lsp::CompletionItemKind::KEYWORD) => "keyword",
Some(lsp::CompletionItemKind::SNIPPET) => "snippet",
Some(lsp::CompletionItemKind::COLOR) => {
let doc = item.documentation.clone();
let maybe_hex_color = match &doc {
let maybe_hex_color = match &item.documentation {
Some(Documentation::String(text)) => Some(text),
Some(Documentation::MarkupContent(MarkupContent { value, .. })) => {
Some(value)