From 0a5badbcba9fad01ccff60a71de7bc891fd05300 Mon Sep 17 00:00:00 2001 From: ivan770 Date: Sat, 27 Mar 2021 11:17:17 +0200 Subject: Replace match on option with if --- crates/ide_assists/src/handlers/remove_dbg.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/ide_assists') 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<()> { macro_call.syntax().text_range() }; - let macro_end = match macro_call.semicolon_token() { - Some(_) => macro_text_range.end() - TextSize::of(';'), - None => macro_text_range.end(), + let macro_end = if macro_call.semicolon_token().is_some() { + macro_text_range.end() - TextSize::of(';') + } else { + macro_text_range.end() }; acc.add( -- cgit v1.2.3