Skip to content

Commit 7740437

Browse files
bors[bot]matklad
andauthored
Merge #3652
3652: Cleanup imports r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents 525feb0 + 7e2bca4 commit 7740437

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

crates/ra_assists/src/handlers/add_custom_impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! FIXME: write short doc here
22
3-
use crate::{Assist, AssistCtx, AssistId};
4-
53
use join_to_string::join;
64
use ra_syntax::{
75
ast::{self, AstNode},
@@ -10,6 +8,8 @@ use ra_syntax::{
108
TextRange, TextUnit,
119
};
1210

11+
use crate::{Assist, AssistCtx, AssistId};
12+
1313
const DERIVE_TRAIT: &str = "derive";
1414

1515
// Assist: add_custom_impl

crates/ra_assists/src/handlers/add_impl.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use format_buf::format;
2-
32
use join_to_string::join;
43
use ra_syntax::{
54
ast::{self, AstNode, NameOwner, TypeParamsOwner},

crates/ra_assists/src/handlers/add_new.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::fmt::Write;
2+
13
use format_buf::format;
24
use hir::Adt;
35
use join_to_string::join;
@@ -7,7 +9,6 @@ use ra_syntax::{
79
},
810
TextUnit, T,
911
};
10-
use std::fmt::Write;
1112

1213
use crate::{Assist, AssistCtx, AssistId};
1314

crates/ra_assists/src/handlers/auto_import.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
use crate::{
2-
assist_ctx::{Assist, AssistCtx},
3-
utils::insert_use_statement,
4-
AssistId,
5-
};
1+
use std::collections::BTreeSet;
2+
63
use hir::{
74
AsAssocItem, AssocItemContainer, ModPath, Module, ModuleDef, PathResolution, Semantics, Trait,
85
Type,
@@ -14,7 +11,12 @@ use ra_syntax::{
1411
SyntaxNode,
1512
};
1613
use rustc_hash::FxHashSet;
17-
use std::collections::BTreeSet;
14+
15+
use crate::{
16+
assist_ctx::{Assist, AssistCtx},
17+
utils::insert_use_statement,
18+
AssistId,
19+
};
1820

1921
// Assist: auto_import
2022
//

crates/ra_assists/src/handlers/fill_match_arms.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
use std::iter;
44

55
use hir::{Adt, HasSource, Semantics};
6+
use ra_ide_db::RootDatabase;
67
use ra_syntax::ast::{self, edit::IndentLevel, make, AstNode, NameOwner};
78

89
use crate::{Assist, AssistCtx, AssistId};
9-
use ra_ide_db::RootDatabase;
1010

1111
// Assist: fill_match_arms
1212
//

crates/ra_assists/src/handlers/invert_if.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
use ra_syntax::ast::{self, AstNode};
2-
use ra_syntax::T;
1+
use ra_syntax::{
2+
ast::{self, AstNode},
3+
T,
4+
};
35

46
use crate::{utils::invert_boolean_expression, Assist, AssistCtx, AssistId};
57

0 commit comments

Comments
 (0)