diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_postfix.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_postfix.rs | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_postfix.rs b/crates/ra_ide_api/src/completion/complete_postfix.rs index e20a12e2a..7042d8bff 100644 --- a/crates/ra_ide_api/src/completion/complete_postfix.rs +++ b/crates/ra_ide_api/src/completion/complete_postfix.rs | |||
@@ -1,18 +1,11 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | completion::{ | 2 | completion::{ |
3 | completion_item::{ | ||
4 | Completions, | ||
5 | Builder, | ||
6 | CompletionKind, | ||
7 | }, | ||
8 | completion_context::CompletionContext, | 3 | completion_context::CompletionContext, |
4 | completion_item::{Builder, CompletionKind, Completions}, | ||
9 | }, | 5 | }, |
10 | CompletionItem | 6 | CompletionItem, |
11 | }; | ||
12 | use ra_syntax::{ | ||
13 | ast::AstNode, | ||
14 | TextRange | ||
15 | }; | 7 | }; |
8 | use ra_syntax::{ast::AstNode, TextRange}; | ||
16 | use ra_text_edit::TextEditBuilder; | 9 | use ra_text_edit::TextEditBuilder; |
17 | 10 | ||
18 | fn postfix_snippet(ctx: &CompletionContext, label: &str, detail: &str, snippet: &str) -> Builder { | 11 | fn postfix_snippet(ctx: &CompletionContext, label: &str, detail: &str, snippet: &str) -> Builder { |
@@ -58,7 +51,7 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) { | |||
58 | 51 | ||
59 | #[cfg(test)] | 52 | #[cfg(test)] |
60 | mod tests { | 53 | mod tests { |
61 | use crate::completion::{CompletionKind, check_completion}; | 54 | use crate::completion::{check_completion, CompletionKind}; |
62 | 55 | ||
63 | fn check_snippet_completion(test_name: &str, code: &str) { | 56 | fn check_snippet_completion(test_name: &str, code: &str) { |
64 | check_completion(test_name, code, CompletionKind::Postfix); | 57 | check_completion(test_name, code, CompletionKind::Postfix); |