perf: do not use unnecessary clone
This commit is contained in:
parent
22259e3a8c
commit
f1281b1634
1 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue