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 f3ab6f0 commit 61e722fCopy full SHA for 61e722f
compiler/rustc_ast_pretty/src/pp.rs
@@ -491,12 +491,9 @@ impl Printer {
491
}
492
493
fn get_top(&mut self) -> PrintStackElem {
494
- match self.print_stack.last() {
495
- Some(el) => *el,
496
- None => {
497
- PrintStackElem { offset: 0, pbreak: PrintStackBreak::Broken(Breaks::Inconsistent) }
498
- }
499
+ *self.print_stack.last().unwrap_or({
+ &PrintStackElem { offset: 0, pbreak: PrintStackBreak::Broken(Breaks::Inconsistent) }
+ })
500
501
502
fn print_begin(&mut self, b: BeginToken, l: isize) {
0 commit comments