diff options
author | ivan770 <[email protected]> | 2021-03-27 09:17:17 +0000 |
---|---|---|
committer | ivan770 <[email protected]> | 2021-03-27 09:17:17 +0000 |
commit | 0a5badbcba9fad01ccff60a71de7bc891fd05300 (patch) | |
tree | 8f11f8790409aec1aa225bdd3aca91bf695a9c60 /crates | |
parent | c7cd0aff4a8332171f014c0ee2893af1d934a3be (diff) |
Replace match on option with if
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( |