Skip to content

Commit

Permalink
Fixed aesthetics of if let block
Browse files Browse the repository at this point in the history
  • Loading branch information
su225 committed Apr 15, 2017
1 parent 65b04fa commit 6fc7d45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc/hir/lowering.rs
Expand Up @@ -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));
}

Expand Down

0 comments on commit 6fc7d45

Please sign in to comment.