misc cleanup suggestions

This commit is contained in:
Brendan Hansknecht 2023-11-29 21:05:56 -08:00
parent b62c9667d5
commit 1f14aa84a2
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
4 changed files with 31 additions and 49 deletions

View file

@ -62,9 +62,9 @@ impl<'a> Formattable for Expr<'a> {
condition.is_multiline() || continuation.is_multiline()
}
Dbg(condition, continuation) => condition.is_multiline() || continuation.is_multiline(),
LowLevelDbg(condition, continuation) => {
condition.is_multiline() || continuation.is_multiline()
}
LowLevelDbg(_, _) => unreachable!(
"LowLevelDbg should only exist after desugaring, not during formatting"
),
If(branches, final_else) => {
final_else.is_multiline()

View file

@ -726,9 +726,8 @@ impl<'a> RemoveSpaces<'a> for Expr<'a> {
arena.alloc(a.remove_spaces(arena)),
arena.alloc(b.remove_spaces(arena)),
),
Expr::LowLevelDbg(a, b) => Expr::LowLevelDbg(
arena.alloc(a.remove_spaces(arena)),
arena.alloc(b.remove_spaces(arena)),
Expr::LowLevelDbg(_, _) => unreachable!(
"LowLevelDbg should only exist after desugaring, not during formatting"
),
Expr::Apply(a, b, c) => Expr::Apply(
arena.alloc(a.remove_spaces(arena)),