mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
tidy.
This commit is contained in:
parent
b6a14ce5b8
commit
a3be52cbc0
1 changed files with 2 additions and 1 deletions
|
@ -39,12 +39,13 @@ pub(crate) fn merge_nested_if(acc: &mut Assists, ctx: &AssistContext<'_>) -> Opt
|
|||
}
|
||||
|
||||
let cond = expr.condition()?;
|
||||
let cond_range = cond.syntax().text_range();
|
||||
//should not apply for if-let
|
||||
if is_pattern_cond(cond.clone()) {
|
||||
return None;
|
||||
}
|
||||
|
||||
let cond_range = cond.syntax().text_range();
|
||||
|
||||
//check if the then branch is a nested if
|
||||
let then_branch = expr.then_branch()?;
|
||||
let stmt = then_branch.stmt_list()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue