cleanup
This commit is contained in:
parent
a8e04a7028
commit
2ae87ffc9a
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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<()> {
|
||||
|
@ -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<()> {
|
||||
|
@ -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()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user