mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Cleanup imports
This commit is contained in:
parent
0c55c06944
commit
7e2bca4ec3
6 changed files with 17 additions and 13 deletions
|
@ -1,7 +1,5 @@
|
||||||
//! FIXME: write short doc here
|
//! FIXME: write short doc here
|
||||||
|
|
||||||
use crate::{Assist, AssistCtx, AssistId};
|
|
||||||
|
|
||||||
use join_to_string::join;
|
use join_to_string::join;
|
||||||
use ra_syntax::{
|
use ra_syntax::{
|
||||||
ast::{self, AstNode},
|
ast::{self, AstNode},
|
||||||
|
@ -10,6 +8,8 @@ use ra_syntax::{
|
||||||
TextRange, TextUnit,
|
TextRange, TextUnit,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use crate::{Assist, AssistCtx, AssistId};
|
||||||
|
|
||||||
const DERIVE_TRAIT: &str = "derive";
|
const DERIVE_TRAIT: &str = "derive";
|
||||||
|
|
||||||
// Assist: add_custom_impl
|
// Assist: add_custom_impl
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use format_buf::format;
|
use format_buf::format;
|
||||||
|
|
||||||
use join_to_string::join;
|
use join_to_string::join;
|
||||||
use ra_syntax::{
|
use ra_syntax::{
|
||||||
ast::{self, AstNode, NameOwner, TypeParamsOwner},
|
ast::{self, AstNode, NameOwner, TypeParamsOwner},
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
use std::fmt::Write;
|
||||||
|
|
||||||
use format_buf::format;
|
use format_buf::format;
|
||||||
use hir::Adt;
|
use hir::Adt;
|
||||||
use join_to_string::join;
|
use join_to_string::join;
|
||||||
|
@ -7,7 +9,6 @@ use ra_syntax::{
|
||||||
},
|
},
|
||||||
TextUnit, T,
|
TextUnit, T,
|
||||||
};
|
};
|
||||||
use std::fmt::Write;
|
|
||||||
|
|
||||||
use crate::{Assist, AssistCtx, AssistId};
|
use crate::{Assist, AssistCtx, AssistId};
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
use crate::{
|
use std::collections::BTreeSet;
|
||||||
assist_ctx::{Assist, AssistCtx},
|
|
||||||
utils::insert_use_statement,
|
|
||||||
AssistId,
|
|
||||||
};
|
|
||||||
use hir::{
|
use hir::{
|
||||||
AsAssocItem, AssocItemContainer, ModPath, Module, ModuleDef, PathResolution, Semantics, Trait,
|
AsAssocItem, AssocItemContainer, ModPath, Module, ModuleDef, PathResolution, Semantics, Trait,
|
||||||
Type,
|
Type,
|
||||||
|
@ -14,7 +11,12 @@ use ra_syntax::{
|
||||||
SyntaxNode,
|
SyntaxNode,
|
||||||
};
|
};
|
||||||
use rustc_hash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
use std::collections::BTreeSet;
|
|
||||||
|
use crate::{
|
||||||
|
assist_ctx::{Assist, AssistCtx},
|
||||||
|
utils::insert_use_statement,
|
||||||
|
AssistId,
|
||||||
|
};
|
||||||
|
|
||||||
// Assist: auto_import
|
// Assist: auto_import
|
||||||
//
|
//
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
use std::iter;
|
use std::iter;
|
||||||
|
|
||||||
use hir::{Adt, HasSource, Semantics};
|
use hir::{Adt, HasSource, Semantics};
|
||||||
|
use ra_ide_db::RootDatabase;
|
||||||
use ra_syntax::ast::{self, edit::IndentLevel, make, AstNode, NameOwner};
|
use ra_syntax::ast::{self, edit::IndentLevel, make, AstNode, NameOwner};
|
||||||
|
|
||||||
use crate::{Assist, AssistCtx, AssistId};
|
use crate::{Assist, AssistCtx, AssistId};
|
||||||
use ra_ide_db::RootDatabase;
|
|
||||||
|
|
||||||
// Assist: fill_match_arms
|
// Assist: fill_match_arms
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
use ra_syntax::ast::{self, AstNode};
|
use ra_syntax::{
|
||||||
use ra_syntax::T;
|
ast::{self, AstNode},
|
||||||
|
T,
|
||||||
|
};
|
||||||
|
|
||||||
use crate::{utils::invert_boolean_expression, Assist, AssistCtx, AssistId};
|
use crate::{utils::invert_boolean_expression, Assist, AssistCtx, AssistId};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue