From 284e89406906b97eec8e0f91bce2955a5e94b880 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 22 Dec 2018 01:34:22 +0300 Subject: cleanup --- crates/ra_analysis/src/completion/complete_scope.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'crates/ra_analysis/src/completion/complete_scope.rs') diff --git a/crates/ra_analysis/src/completion/complete_scope.rs b/crates/ra_analysis/src/completion/complete_scope.rs index f39b98d62..fb87be4b1 100644 --- a/crates/ra_analysis/src/completion/complete_scope.rs +++ b/crates/ra_analysis/src/completion/complete_scope.rs @@ -3,7 +3,7 @@ use ra_syntax::TextUnit; use crate::{ Cancelable, - completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, + completion::{CompletionItem, Completions, CompletionKind, CompletionContext}, }; pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> { @@ -29,7 +29,9 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> } } }) - .for_each(|(name, _res)| CompletionItem::new(Reference, name.to_string()).add_to(acc)); + .for_each(|(name, _res)| { + CompletionItem::new(CompletionKind::Reference, name.to_string()).add_to(acc) + }); } Ok(()) @@ -41,9 +43,11 @@ fn complete_fn(acc: &mut Completions, scopes: &hir::FnScopes, offset: TextUnit) .scope_chain_for_offset(offset) .flat_map(|scope| scopes.entries(scope).iter()) .filter(|entry| shadowed.insert(entry.name())) - .for_each(|entry| CompletionItem::new(Reference, entry.name().to_string()).add_to(acc)); + .for_each(|entry| { + CompletionItem::new(CompletionKind::Reference, entry.name().to_string()).add_to(acc) + }); if scopes.self_param.is_some() { - CompletionItem::new(Reference, "self").add_to(acc); + CompletionItem::new(CompletionKind::Reference, "self").add_to(acc); } } -- cgit v1.2.3