Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/extract_module.rs')
| -rw-r--r-- | crates/ide-assists/src/handlers/extract_module.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/crates/ide-assists/src/handlers/extract_module.rs b/crates/ide-assists/src/handlers/extract_module.rs index b94422b13c..8a7bb5a1f0 100644 --- a/crates/ide-assists/src/handlers/extract_module.rs +++ b/crates/ide-assists/src/handlers/extract_module.rs @@ -4,23 +4,24 @@ use either::Either; use hir::{HasSource, HirFileIdExt, ModuleSource}; use ide_db::base_db::salsa::AsDynDatabase; use ide_db::{ + FileId, FxHashMap, FxHashSet, assists::{AssistId, AssistKind}, defs::{Definition, NameClass, NameRefClass}, search::{FileReference, SearchScope}, - FileId, FxHashMap, FxHashSet, }; use itertools::Itertools; use smallvec::SmallVec; use syntax::{ + AstNode, + SyntaxKind::{self, WHITESPACE}, + SyntaxNode, TextRange, TextSize, algo::find_node_at_range, ast::{ - self, + self, HasVisibility, edit::{AstNodeEdit, IndentLevel}, - make, HasVisibility, + make, }, - match_ast, ted, AstNode, - SyntaxKind::{self, WHITESPACE}, - SyntaxNode, TextRange, TextSize, + match_ast, ted, }; use crate::{AssistContext, Assists}; @@ -1167,8 +1168,8 @@ mod modname { } #[test] - fn test_extract_module_for_impl_not_having_corresponding_adt_in_selection_and_not_in_same_mod_but_with_super( - ) { + fn test_extract_module_for_impl_not_having_corresponding_adt_in_selection_and_not_in_same_mod_but_with_super() + { check_assist( extract_module, r" |