diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ide_assists/src/handlers/remove_dbg.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ide_assists/src/handlers/remove_dbg.rs b/crates/ide_assists/src/handlers/remove_dbg.rs index 449795efd..ae0f6b83f 100644 --- a/crates/ide_assists/src/handlers/remove_dbg.rs +++ b/crates/ide_assists/src/handlers/remove_dbg.rs | |||
@@ -40,9 +40,10 @@ pub(crate) fn remove_dbg(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | |||
40 | macro_call.syntax().text_range() | 40 | macro_call.syntax().text_range() |
41 | }; | 41 | }; |
42 | 42 | ||
43 | let macro_end = match macro_call.semicolon_token() { | 43 | let macro_end = if macro_call.semicolon_token().is_some() { |
44 | Some(_) => macro_text_range.end() - TextSize::of(';'), | 44 | macro_text_range.end() - TextSize::of(';') |
45 | None => macro_text_range.end(), | 45 | } else { |
46 | macro_text_range.end() | ||
46 | }; | 47 | }; |
47 | 48 | ||
48 | acc.add( | 49 | acc.add( |