From 2ae87ffc9afe67945e2ad655c3577b589ff640ab Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 22 Dec 2018 01:02:43 +0300 Subject: cleanup --- crates/ra_analysis/src/completion/complete_fn_param.rs | 10 +++------- crates/ra_analysis/src/completion/complete_keyword.rs | 4 +--- crates/ra_analysis/src/completion/complete_path.rs | 2 +- crates/ra_analysis/src/completion/complete_scope.rs | 2 +- crates/ra_analysis/src/completion/complete_snippet.rs | 4 +--- 5 files changed, 7 insertions(+), 15 deletions(-) (limited to 'crates/ra_analysis/src/completion') diff --git a/crates/ra_analysis/src/completion/complete_fn_param.rs b/crates/ra_analysis/src/completion/complete_fn_param.rs index 3ec507fdf..6a6213e67 100644 --- a/crates/ra_analysis/src/completion/complete_fn_param.rs +++ b/crates/ra_analysis/src/completion/complete_fn_param.rs @@ -1,15 +1,11 @@ use ra_syntax::{ - algo::{ - visit::{visitor_ctx, VisitorCtx} - }, + algo::visit::{visitor_ctx, VisitorCtx}, ast, AstNode, }; -use rustc_hash::{FxHashMap}; +use rustc_hash::FxHashMap; -use crate::{ - completion::{CompletionContext, Completions, CompletionKind, CompletionItem}, -}; +use crate::completion::{CompletionContext, Completions, CompletionKind, CompletionItem}; /// Complete repeated parametes, both name and type. For example, if all /// functions in a file have a `spam: &mut Spam` parameter, a completion with diff --git a/crates/ra_analysis/src/completion/complete_keyword.rs b/crates/ra_analysis/src/completion/complete_keyword.rs index 2ee36430e..dead15bb6 100644 --- a/crates/ra_analysis/src/completion/complete_keyword.rs +++ b/crates/ra_analysis/src/completion/complete_keyword.rs @@ -5,9 +5,7 @@ use ra_syntax::{ SyntaxKind::*, SyntaxNodeRef, }; -use crate::{ - completion::{CompletionContext, CompletionItem, Completions, CompletionKind::*}, -}; +use crate::completion::{CompletionContext, CompletionItem, Completions, CompletionKind::*}; pub(super) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionContext) { if !ctx.is_trivial_path { diff --git a/crates/ra_analysis/src/completion/complete_path.rs b/crates/ra_analysis/src/completion/complete_path.rs index 41e439b1b..5fc24af72 100644 --- a/crates/ra_analysis/src/completion/complete_path.rs +++ b/crates/ra_analysis/src/completion/complete_path.rs @@ -1,6 +1,6 @@ use crate::{ - completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, Cancelable, + completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, }; pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> { diff --git a/crates/ra_analysis/src/completion/complete_scope.rs b/crates/ra_analysis/src/completion/complete_scope.rs index c1ab19d5b..d07c0e46d 100644 --- a/crates/ra_analysis/src/completion/complete_scope.rs +++ b/crates/ra_analysis/src/completion/complete_scope.rs @@ -2,8 +2,8 @@ use rustc_hash::FxHashSet; use ra_syntax::TextUnit; use crate::{ + Cancelable, completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, - Cancelable }; pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> { diff --git a/crates/ra_analysis/src/completion/complete_snippet.rs b/crates/ra_analysis/src/completion/complete_snippet.rs index 6816ae695..ccd68832b 100644 --- a/crates/ra_analysis/src/completion/complete_snippet.rs +++ b/crates/ra_analysis/src/completion/complete_snippet.rs @@ -1,6 +1,4 @@ -use crate::{ - completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, -}; +use crate::completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}; pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) { if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) { -- cgit v1.2.3