diff options
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/remove_dbg.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_assists/src/remove_dbg.rs b/crates/ra_assists/src/remove_dbg.rs index 6609abab2..40f97a849 100644 --- a/crates/ra_assists/src/remove_dbg.rs +++ b/crates/ra_assists/src/remove_dbg.rs | |||
@@ -28,7 +28,7 @@ pub(crate) fn remove_dbg(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | |||
28 | .checked_sub(macro_range.start()) | 28 | .checked_sub(macro_range.start()) |
29 | .unwrap_or_else(|| TextUnit::from(0)); | 29 | .unwrap_or_else(|| TextUnit::from(0)); |
30 | 30 | ||
31 | let dbg_size = dbg!(TextUnit::of_str("dbg!(")); | 31 | let dbg_size = TextUnit::of_str("dbg!("); |
32 | 32 | ||
33 | if offset_start > dbg_size { | 33 | if offset_start > dbg_size { |
34 | file_range.start() - dbg_size | 34 | file_range.start() - dbg_size |
@@ -39,8 +39,7 @@ pub(crate) fn remove_dbg(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | |||
39 | 39 | ||
40 | let macro_content = { | 40 | let macro_content = { |
41 | let macro_args = macro_call.token_tree()?.syntax(); | 41 | let macro_args = macro_call.token_tree()?.syntax(); |
42 | let _ = dbg!(macro_args.text()); | 42 | let range = macro_args.range(); |
43 | let range = dbg!(macro_args.range()); | ||
44 | let start = range.start() + TextUnit::of_char('('); | 43 | let start = range.start() + TextUnit::of_char('('); |
45 | let end = range.end() - TextUnit::of_char(')'); | 44 | let end = range.end() - TextUnit::of_char(')'); |
46 | 45 | ||