aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/split_import.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/split_import.rs')
-rw-r--r--crates/ra_assists/src/split_import.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/split_import.rs b/crates/ra_assists/src/split_import.rs
index f043be636..dd5be4e91 100644
--- a/crates/ra_assists/src/split_import.rs
+++ b/crates/ra_assists/src/split_import.rs
@@ -5,7 +5,7 @@ use ra_syntax::{
5 algo::generate, 5 algo::generate,
6}; 6};
7 7
8use crate::{AssistCtx, Assist}; 8use crate::{AssistCtx, Assist, AssistId};
9 9
10pub(crate) fn split_import(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { 10pub(crate) fn split_import(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
11 let colon_colon = ctx.leaf_at_offset().find(|leaf| leaf.kind() == COLONCOLON)?; 11 let colon_colon = ctx.leaf_at_offset().find(|leaf| leaf.kind() == COLONCOLON)?;
@@ -23,7 +23,7 @@ pub(crate) fn split_import(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assis
23 None => top_path.syntax().range().end(), 23 None => top_path.syntax().range().end(),
24 }; 24 };
25 25
26 ctx.add_action("split import", |edit| { 26 ctx.add_action(AssistId("split_import"), "split import", |edit| {
27 edit.target(colon_colon.range()); 27 edit.target(colon_colon.range());
28 edit.insert(l_curly, "{"); 28 edit.insert(l_curly, "{");
29 edit.insert(r_curly, "}"); 29 edit.insert(r_curly, "}");