We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 769ba84 + 7962ccb commit 76db75aCopy full SHA for 76db75a
src/libsyntax/print/pprust.rs
@@ -1645,7 +1645,7 @@ impl<'a> State<'a> {
1645
self.print_expr_as_cond(i);
1646
self.s.space();
1647
self.print_block(then);
1648
- self.print_else(e.as_ref().map(|e| &**e))
+ self.print_else(e.as_deref())
1649
}
1650
// Final `else` block.
1651
ast::ExprKind::Block(ref b, _) => {
@@ -1949,7 +1949,7 @@ impl<'a> State<'a> {
1949
self.print_let(pat, scrutinee);
1950
1951
ast::ExprKind::If(ref test, ref blk, ref elseopt) => {
1952
- self.print_if(test, blk, elseopt.as_ref().map(|e| &**e));
+ self.print_if(test, blk, elseopt.as_deref())
1953
1954
ast::ExprKind::While(ref test, ref blk, opt_label) => {
1955
if let Some(label) = opt_label {
0 commit comments