diff options
author | Aleksey Kladov <[email protected]> | 2019-07-04 21:05:17 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-04 21:09:09 +0100 |
commit | 1834bae5b86c54ed9dece26e82436919d59e6cb7 (patch) | |
tree | 92c8b984e874b67fa1831613464bbe356c1af3dd /crates/ra_ide_api/src/completion/complete_postfix.rs | |
parent | 2b2cd829b0f95aef338227deb05ec7503dae9b6c (diff) |
allow rustfmt to reorder imports
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
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); |