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_assists/src/auto_import.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_assists/src/auto_import.rs')
-rw-r--r-- | crates/ra_assists/src/auto_import.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/crates/ra_assists/src/auto_import.rs b/crates/ra_assists/src/auto_import.rs index 9617beb5c..75ab8fa0f 100644 --- a/crates/ra_assists/src/auto_import.rs +++ b/crates/ra_assists/src/auto_import.rs | |||
@@ -1,14 +1,15 @@ | |||
1 | use hir::{self, db::HirDatabase}; | ||
1 | use ra_text_edit::TextEditBuilder; | 2 | use ra_text_edit::TextEditBuilder; |
2 | use hir::{ self, db::HirDatabase}; | ||
3 | 3 | ||
4 | use ra_syntax::{ | ||
5 | T, | ||
6 | ast::{ self, NameOwner }, AstNode, SyntaxNode, Direction, TextRange, SmolStr, | ||
7 | SyntaxKind::{ PATH, PATH_SEGMENT } | ||
8 | }; | ||
9 | use crate::{ | 4 | use crate::{ |
5 | assist_ctx::{Assist, AssistCtx}, | ||
10 | AssistId, | 6 | AssistId, |
11 | assist_ctx::{AssistCtx, Assist}, | 7 | }; |
8 | use ra_syntax::{ | ||
9 | ast::{self, NameOwner}, | ||
10 | AstNode, Direction, SmolStr, | ||
11 | SyntaxKind::{PATH, PATH_SEGMENT}, | ||
12 | SyntaxNode, TextRange, T, | ||
12 | }; | 13 | }; |
13 | 14 | ||
14 | fn collect_path_segments_raw<'a>( | 15 | fn collect_path_segments_raw<'a>( |
@@ -577,7 +578,7 @@ pub(crate) fn auto_import(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist | |||
577 | #[cfg(test)] | 578 | #[cfg(test)] |
578 | mod tests { | 579 | mod tests { |
579 | use super::*; | 580 | use super::*; |
580 | use crate::helpers::{ check_assist, check_assist_not_applicable }; | 581 | use crate::helpers::{check_assist, check_assist_not_applicable}; |
581 | 582 | ||
582 | #[test] | 583 | #[test] |
583 | fn test_auto_import_add_use_no_anchor() { | 584 | fn test_auto_import_add_use_no_anchor() { |