diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 21:09:32 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-04 21:09:32 +0100 |
commit | cacdb0eab8131bfb945eb7ed0150c92ec56eefe2 (patch) | |
tree | f762de90ce813591bc640ae0bce36493a3dcafa9 /crates/ra_ide_api/src/completion/presentation.rs | |
parent | 4e8664d9d37021e85d72b6228fa45e7edf4a1a74 (diff) | |
parent | 1834bae5b86c54ed9dece26e82436919d59e6cb7 (diff) |
Merge #1486
1486: allow rustfmt to reorder imports r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion/presentation.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/presentation.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index 973936736..98060947a 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs | |||
@@ -1,16 +1,14 @@ | |||
1 | //! This modules takes care of rendering various defenitions as completion items. | 1 | //! This modules takes care of rendering various defenitions as completion items. |
2 | use hir::{Docs, HasSource, HirDisplay, PerNs, Resolution}; | ||
2 | use join_to_string::join; | 3 | use join_to_string::join; |
3 | use test_utils::tested_by; | ||
4 | use hir::{Docs, PerNs, Resolution, HirDisplay, HasSource}; | ||
5 | use ra_syntax::ast::NameOwner; | 4 | use ra_syntax::ast::NameOwner; |
5 | use test_utils::tested_by; | ||
6 | 6 | ||
7 | use crate::completion::{ | 7 | use crate::completion::{ |
8 | Completions, CompletionKind, CompletionItemKind, CompletionContext, CompletionItem, | 8 | CompletionContext, CompletionItem, CompletionItemKind, CompletionKind, Completions, |
9 | }; | 9 | }; |
10 | 10 | ||
11 | use crate::display::{ | 11 | use crate::display::{const_label, function_label, type_label}; |
12 | function_label, const_label, type_label, | ||
13 | }; | ||
14 | 12 | ||
15 | impl Completions { | 13 | impl Completions { |
16 | pub(crate) fn add_field( | 14 | pub(crate) fn add_field( |
@@ -178,7 +176,7 @@ impl Completions { | |||
178 | mod tests { | 176 | mod tests { |
179 | use test_utils::covers; | 177 | use test_utils::covers; |
180 | 178 | ||
181 | use crate::completion::{CompletionKind, check_completion}; | 179 | use crate::completion::{check_completion, CompletionKind}; |
182 | 180 | ||
183 | fn check_reference_completion(code: &str, expected_completions: &str) { | 181 | fn check_reference_completion(code: &str, expected_completions: &str) { |
184 | check_completion(code, expected_completions, CompletionKind::Reference); | 182 | check_completion(code, expected_completions, CompletionKind::Reference); |