Fixed aesthetics of if let block
This commit is contained in:
parent
65b04fa068
commit
6fc7d45d64
1 changed files with 4 additions and 4 deletions
|
@ -2051,10 +2051,10 @@ impl<'a> LoweringContext<'a> {
|
|||
let wildcard_arm: Option<&Expr> = else_opt.as_ref().map(|p| &**p);
|
||||
let wildcard_pattern = self.pat_wild(e.span);
|
||||
let body = if let Some(else_expr) = wildcard_arm {
|
||||
P(self.lower_expr(else_expr))
|
||||
} else {
|
||||
self.expr_tuple(e.span, hir_vec![])
|
||||
};
|
||||
P(self.lower_expr(else_expr))
|
||||
} else {
|
||||
self.expr_tuple(e.span, hir_vec![])
|
||||
};
|
||||
arms.push(self.arm(hir_vec![wildcard_pattern], body));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue