diff options
author | Aleksey Kladov <[email protected]> | 2018-12-21 22:02:43 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-21 22:03:58 +0000 |
commit | 2ae87ffc9afe67945e2ad655c3577b589ff640ab (patch) | |
tree | 476e69b61da4032f02736eda529e580a33c65595 /crates | |
parent | a8e04a702827c454f5336c82262b0963df7fe484 (diff) |
cleanup
Diffstat (limited to 'crates')
5 files changed, 7 insertions, 15 deletions
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 @@ | |||
1 | use ra_syntax::{ | 1 | use ra_syntax::{ |
2 | algo::{ | 2 | algo::visit::{visitor_ctx, VisitorCtx}, |
3 | visit::{visitor_ctx, VisitorCtx} | ||
4 | }, | ||
5 | ast, | 3 | ast, |
6 | AstNode, | 4 | AstNode, |
7 | }; | 5 | }; |
8 | use rustc_hash::{FxHashMap}; | 6 | use rustc_hash::FxHashMap; |
9 | 7 | ||
10 | use crate::{ | 8 | use crate::completion::{CompletionContext, Completions, CompletionKind, CompletionItem}; |
11 | completion::{CompletionContext, Completions, CompletionKind, CompletionItem}, | ||
12 | }; | ||
13 | 9 | ||
14 | /// Complete repeated parametes, both name and type. For example, if all | 10 | /// Complete repeated parametes, both name and type. For example, if all |
15 | /// functions in a file have a `spam: &mut Spam` parameter, a completion with | 11 | /// 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::{ | |||
5 | SyntaxKind::*, SyntaxNodeRef, | 5 | SyntaxKind::*, SyntaxNodeRef, |
6 | }; | 6 | }; |
7 | 7 | ||
8 | use crate::{ | 8 | use crate::completion::{CompletionContext, CompletionItem, Completions, CompletionKind::*}; |
9 | completion::{CompletionContext, CompletionItem, Completions, CompletionKind::*}, | ||
10 | }; | ||
11 | 9 | ||
12 | pub(super) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionContext) { | 10 | pub(super) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionContext) { |
13 | if !ctx.is_trivial_path { | 11 | 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 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, | ||
3 | Cancelable, | 2 | Cancelable, |
3 | completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, | ||
4 | }; | 4 | }; |
5 | 5 | ||
6 | pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> { | 6 | 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; | |||
2 | use ra_syntax::TextUnit; | 2 | use ra_syntax::TextUnit; |
3 | 3 | ||
4 | use crate::{ | 4 | use crate::{ |
5 | Cancelable, | ||
5 | completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, | 6 | completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, |
6 | Cancelable | ||
7 | }; | 7 | }; |
8 | 8 | ||
9 | pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> { | 9 | 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 @@ | |||
1 | use crate::{ | 1 | use crate::completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}; |
2 | completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, | ||
3 | }; | ||
4 | 2 | ||
5 | pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) { | 3 | pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) { |
6 | if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) { | 4 | if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) { |