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.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_assists/src/remove_dbg.rs b/crates/ra_assists/src/remove_dbg.rs
index db260c6ca..2bed270a1 100644
--- a/crates/ra_assists/src/remove_dbg.rs
+++ b/crates/ra_assists/src/remove_dbg.rs
@@ -17,9 +17,9 @@ pub(crate) fn remove_dbg(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist>
17 17
18 let macro_range = macro_call.syntax().range(); 18 let macro_range = macro_call.syntax().range();
19 19
20 // If the cursor is inside the macrocall, we'll try to maintain 20 // If the cursor is inside the macro call, we'll try to maintain the cursor
21 // the cursor position by subtracting the length of dbg!( from the start 21 // position by subtracting the length of dbg!( from the start of the file
22 // of the filerange, otherwise we'll default to using the start of the macrocall 22 // range, otherwise we'll default to using the start of the macro call
23 let cursor_pos = { 23 let cursor_pos = {
24 let file_range = ctx.frange.range; 24 let file_range = ctx.frange.range;
25 25
@@ -61,7 +61,7 @@ fn is_valid_macrocall(macro_call: &ast::MacroCall, macro_name: &str) -> Option<b
61 let path = macro_call.path()?; 61 let path = macro_call.path()?;
62 let name_ref = path.segment()?.name_ref()?; 62 let name_ref = path.segment()?.name_ref()?;
63 63
64 // Make sure it is actually a dbg-macrocall, dbg followed by ! 64 // Make sure it is actually a dbg-macro call, dbg followed by !
65 let excl = path.syntax().next_sibling()?; 65 let excl = path.syntax().next_sibling()?;
66 66
67 if name_ref.text() != macro_name || excl.kind() != EXCL { 67 if name_ref.text() != macro_name || excl.kind() != EXCL {