From f2cb7dbcb71d81336c95dc7ae1301ba2a79ef707 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 20 Jan 2021 18:38:12 +0100 Subject: Partially unify SymbolKind and CompletionItemKind --- crates/completion/src/completions/record.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'crates/completion/src/completions/record.rs') diff --git a/crates/completion/src/completions/record.rs b/crates/completion/src/completions/record.rs index bb6354ded..0a7927eb8 100644 --- a/crates/completion/src/completions/record.rs +++ b/crates/completion/src/completions/record.rs @@ -1,10 +1,8 @@ //! Complete fields in record literals and patterns. -use ide_db::helpers::FamousDefs; +use ide_db::{helpers::FamousDefs, SymbolKind}; use syntax::ast::Expr; -use crate::{ - item::CompletionKind, CompletionContext, CompletionItem, CompletionItemKind, Completions, -}; +use crate::{item::CompletionKind, CompletionContext, CompletionItem, Completions}; pub(crate) fn complete_record(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> { let missing_fields = match (ctx.record_pat_syntax.as_ref(), ctx.record_lit_syntax.as_ref()) { @@ -31,7 +29,7 @@ pub(crate) fn complete_record(acc: &mut Completions, ctx: &CompletionContext) -> "..Default::default()", ) .insert_text(completion_text) - .kind(CompletionItemKind::Field) + .kind(SymbolKind::Field) .build(), ); } -- cgit v1.2.3