From b857a0b48857f01b46164565b85ef0dc91acd861 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 5 Oct 2024 13:27:03 -0400 Subject: [PATCH] Include description in label details when detail field is marked for resolution --- crates/rust-analyzer/src/lsp/to_proto.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/rust-analyzer/src/lsp/to_proto.rs b/crates/rust-analyzer/src/lsp/to_proto.rs index 375b7428c2..1fb6535258 100644 --- a/crates/rust-analyzer/src/lsp/to_proto.rs +++ b/crates/rust-analyzer/src/lsp/to_proto.rs @@ -339,7 +339,7 @@ fn completion_item( something_to_resolve = item.detail.is_some(); None } else { - item.detail + item.detail.clone() }; let documentation = if fields_to_resolve.resolve_documentation { @@ -370,7 +370,7 @@ fn completion_item( } else { lsp_item.label_details = Some(lsp_types::CompletionItemLabelDetails { detail: item.label_detail.as_ref().map(ToString::to_string), - description: lsp_item.detail.clone(), + description: item.detail, }); } } else if let Some(label_detail) = item.label_detail {