tidy.
This commit is contained in:
parent
b6a14ce5b8
commit
a3be52cbc0
@ -39,12 +39,13 @@ pub(crate) fn merge_nested_if(acc: &mut Assists, ctx: &AssistContext<'_>) -> Opt
|
|||||||
}
|
}
|
||||||
|
|
||||||
let cond = expr.condition()?;
|
let cond = expr.condition()?;
|
||||||
let cond_range = cond.syntax().text_range();
|
|
||||||
//should not apply for if-let
|
//should not apply for if-let
|
||||||
if is_pattern_cond(cond.clone()) {
|
if is_pattern_cond(cond.clone()) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let cond_range = cond.syntax().text_range();
|
||||||
|
|
||||||
//check if the then branch is a nested if
|
//check if the then branch is a nested if
|
||||||
let then_branch = expr.then_branch()?;
|
let then_branch = expr.then_branch()?;
|
||||||
let stmt = then_branch.stmt_list()?;
|
let stmt = then_branch.stmt_list()?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user