collapse some nested blocks

This commit is contained in:
Daniel Eades 2023-01-10 20:40:08 +00:00
parent 95fc3ba41c
commit d218b237fd
10 changed files with 62 additions and 78 deletions

View file

@ -205,10 +205,8 @@ fn on_eq_typed(file: &SourceFile, offset: TextSize) -> Option<TextEdit> {
if expr_stmt.semicolon_token().is_some() {
return None;
}
} else {
if !ast::StmtList::can_cast(binop.syntax().parent()?.kind()) {
return None;
}
} else if !ast::StmtList::can_cast(binop.syntax().parent()?.kind()) {
return None;
}
let expr = binop.rhs()?;