Fix formatting of if as an left-hand-side of an operator

This commit is contained in:
Joshua Warner 2021-11-30 14:53:28 -08:00
parent 68e206f42c
commit 3228a23c98
2 changed files with 10 additions and 0 deletions

View file

@ -1098,6 +1098,7 @@ fn sub_expr_requests_parens(expr: &Expr<'_>) -> bool {
BinOp::Pizza | BinOp::Assignment | BinOp::HasType | BinOp::Backpassing => false,
})
}
Expr::If(_, _) => true,
_ => false,
}
}