mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
collapse some nested blocks
This commit is contained in:
parent
95fc3ba41c
commit
d218b237fd
10 changed files with 62 additions and 78 deletions
|
@ -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()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue