Skip to content

Commit a3be52c

Browse files
committed
tidy.
1 parent b6a14ce commit a3be52c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/ide-assists/src/handlers/merge_nested_if.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ pub(crate) fn merge_nested_if(acc: &mut Assists, ctx: &AssistContext<'_>) -> Opt
3939
}
4040

4141
let cond = expr.condition()?;
42-
let cond_range = cond.syntax().text_range();
4342
//should not apply for if-let
4443
if is_pattern_cond(cond.clone()) {
4544
return None;
4645
}
4746

47+
let cond_range = cond.syntax().text_range();
48+
4849
//check if the then branch is a nested if
4950
let then_branch = expr.then_branch()?;
5051
let stmt = then_branch.stmt_list()?;

0 commit comments

Comments
 (0)