aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-21 22:02:43 +0000
committerAleksey Kladov <[email protected]>2018-12-21 22:03:58 +0000
commit2ae87ffc9afe67945e2ad655c3577b589ff640ab (patch)
tree476e69b61da4032f02736eda529e580a33c65595 /crates
parenta8e04a702827c454f5336c82262b0963df7fe484 (diff)
cleanup
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_analysis/src/completion/complete_fn_param.rs10
-rw-r--r--crates/ra_analysis/src/completion/complete_keyword.rs4
-rw-r--r--crates/ra_analysis/src/completion/complete_path.rs2
-rw-r--r--crates/ra_analysis/src/completion/complete_scope.rs2
-rw-r--r--crates/ra_analysis/src/completion/complete_snippet.rs4
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 @@
1use ra_syntax::{ 1use 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};
8use rustc_hash::{FxHashMap}; 6use rustc_hash::FxHashMap;
9 7
10use crate::{ 8use 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
8use crate::{ 8use crate::completion::{CompletionContext, CompletionItem, Completions, CompletionKind::*};
9 completion::{CompletionContext, CompletionItem, Completions, CompletionKind::*},
10};
11 9
12pub(super) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionContext) { 10pub(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 @@
1use crate::{ 1use crate::{
2 completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
3 Cancelable, 2 Cancelable,
3 completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
4}; 4};
5 5
6pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> { 6pub(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;
2use ra_syntax::TextUnit; 2use ra_syntax::TextUnit;
3 3
4use crate::{ 4use crate::{
5 Cancelable,
5 completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext}, 6 completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
6 Cancelable
7}; 7};
8 8
9pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) -> Cancelable<()> { 9pub(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 @@
1use crate::{ 1use crate::completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext};
2 completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
3};
4 2
5pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) { 3pub(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()) {