aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/remove_dbg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/remove_dbg.rs')
-rw-r--r--crates/ra_assists/src/remove_dbg.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/remove_dbg.rs b/crates/ra_assists/src/remove_dbg.rs
index 5657ee4b8..870133fda 100644
--- a/crates/ra_assists/src/remove_dbg.rs
+++ b/crates/ra_assists/src/remove_dbg.rs
@@ -12,7 +12,7 @@ pub(crate) fn remove_dbg(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist>
12 return None; 12 return None;
13 } 13 }
14 14
15 let macro_range = macro_call.syntax().range(); 15 let macro_range = macro_call.syntax().text_range();
16 16
17 // If the cursor is inside the macro call, we'll try to maintain the cursor 17 // If the cursor is inside the macro call, we'll try to maintain the cursor
18 // position by subtracting the length of dbg!( from the start of the file 18 // position by subtracting the length of dbg!( from the start of the file
@@ -43,7 +43,7 @@ pub(crate) fn remove_dbg(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist>
43 }; 43 };
44 44
45 ctx.add_action(AssistId("remove_dbg"), "remove dbg!()", |edit| { 45 ctx.add_action(AssistId("remove_dbg"), "remove dbg!()", |edit| {
46 edit.target(macro_call.syntax().range()); 46 edit.target(macro_call.syntax().text_range());
47 edit.replace(macro_range, macro_content); 47 edit.replace(macro_range, macro_content);
48 edit.set_cursor(cursor_pos); 48 edit.set_cursor(cursor_pos);
49 }); 49 });