Merge pull request #7536 from joshuawarner32/remove-indented-else

Remove indented-else syntax from the formatter
This commit is contained in:
Luke Boswell 2025-01-21 18:02:05 +11:00 committed by GitHub
commit 5b4c8e70d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 121 additions and 50 deletions

View file

@ -778,11 +778,11 @@ impl<'a> Normalize<'a> for Expr<'a> {
Expr::If {
if_thens,
final_else,
indented_else,
indented_else: _,
} => Expr::If {
if_thens: if_thens.normalize(arena),
final_else: arena.alloc(final_else.normalize(arena)),
indented_else,
indented_else: false,
},
Expr::When(a, b) => Expr::When(arena.alloc(a.normalize(arena)), b.normalize(arena)),
Expr::ParensAround(a) => {