Replace match on option with if
This commit is contained in:
parent
c7cd0aff4a
commit
0a5badbcba
1 changed files with 4 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue