Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Rust: Prefer completion.label_details over completion.details (#13797)

Piotr Osiewicz8ec478cbcd48
diff --git a/crates/languages/src/rust.rs b/crates/languages/src/rust.rs
index a92021287c0..6ad38e98291 100644
--- a/crates/languages/src/rust.rs
+++ b/crates/languages/src/rust.rs
@@ -203,12 +203,10 @@ impl LspAdapter for RustLspAdapter {
language: &Arc<Language>,
) -> Option<CodeLabel> {
let detail = completion
- .detail
+ .label_details
.as_ref()
- .or(completion
- .label_details
- .as_ref()
- .and_then(|detail| detail.detail.as_ref()))
+ .and_then(|detail| detail.detail.as_ref())
+ .or(completion.detail.as_ref())
.map(ToOwned::to_owned);
match completion.kind {
Some(lsp::CompletionItemKind::FIELD) if detail.is_some() => {