aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/unmerge_use.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/assists/src/handlers/unmerge_use.rs')
-rw-r--r--crates/assists/src/handlers/unmerge_use.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/assists/src/handlers/unmerge_use.rs b/crates/assists/src/handlers/unmerge_use.rs
index 6da1795da..3dbef8e51 100644
--- a/crates/assists/src/handlers/unmerge_use.rs
+++ b/crates/assists/src/handlers/unmerge_use.rs
@@ -3,6 +3,7 @@ use syntax::{
3 ast::{self, edit::AstNodeEdit, VisibilityOwner}, 3 ast::{self, edit::AstNodeEdit, VisibilityOwner},
4 AstNode, SyntaxKind, 4 AstNode, SyntaxKind,
5}; 5};
6use test_utils::mark;
6 7
7use crate::{ 8use crate::{
8 assist_context::{AssistContext, Assists}, 9 assist_context::{AssistContext, Assists},
@@ -26,6 +27,7 @@ pub(crate) fn unmerge_use(acc: &mut Assists, ctx: &AssistContext) -> Option<()>
26 27
27 let tree_list = tree.syntax().parent().and_then(ast::UseTreeList::cast)?; 28 let tree_list = tree.syntax().parent().and_then(ast::UseTreeList::cast)?;
28 if tree_list.use_trees().count() < 2 { 29 if tree_list.use_trees().count() < 2 {
30 mark::hit!(skip_single_use_item);
29 return None; 31 return None;
30 } 32 }
31 33
@@ -87,6 +89,7 @@ mod tests {
87 89
88 #[test] 90 #[test]
89 fn skip_single_use_item() { 91 fn skip_single_use_item() {
92 mark::check!(skip_single_use_item);
90 check_assist_not_applicable( 93 check_assist_not_applicable(
91 unmerge_use, 94 unmerge_use,
92 r" 95 r"