We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce361fb commit 7962ccbCopy full SHA for 7962ccb
src/libsyntax/print/pprust.rs
@@ -1643,7 +1643,7 @@ impl<'a> State<'a> {
1643
self.print_expr_as_cond(i);
1644
self.s.space();
1645
self.print_block(then);
1646
- self.print_else(e.as_ref().map(|e| &**e))
+ self.print_else(e.as_deref())
1647
}
1648
// Final `else` block.
1649
ast::ExprKind::Block(ref b, _) => {
@@ -1947,7 +1947,7 @@ impl<'a> State<'a> {
1947
self.print_let(pat, scrutinee);
1948
1949
ast::ExprKind::If(ref test, ref blk, ref elseopt) => {
1950
- self.print_if(test, blk, elseopt.as_ref().map(|e| &**e));
+ self.print_if(test, blk, elseopt.as_deref())
1951
1952
ast::ExprKind::While(ref test, ref blk, opt_label) => {
1953
if let Some(label) = opt_label {
0 commit comments