Skip to content

Commit 0a5badb

Browse files
committed
Replace match on option with if
1 parent c7cd0af commit 0a5badb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/ide_assists/src/handlers/remove_dbg.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ pub(crate) fn remove_dbg(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
4040
macro_call.syntax().text_range()
4141
};
4242

43-
let macro_end = match macro_call.semicolon_token() {
44-
Some(_) => macro_text_range.end() - TextSize::of(';'),
45-
None => macro_text_range.end(),
43+
let macro_end = if macro_call.semicolon_token().is_some() {
44+
macro_text_range.end() - TextSize::of(';')
45+
} else {
46+
macro_text_range.end()
4647
};
4748

4849
acc.add(

0 commit comments

Comments
 (0)