Skip to content

Commit 57cf7a2

Browse files
Simplify print_end
Presumably the code was from an older age of Rust and can now be written much simpler.
1 parent 55a6a76 commit 57cf7a2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/libsyntax/print/pp.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,7 @@ impl Printer {
521521

522522
fn print_end(&mut self) {
523523
debug!("print End -> pop End");
524-
let print_stack = &mut self.print_stack;
525-
assert!(!print_stack.is_empty());
526-
print_stack.pop().unwrap();
524+
self.print_stack.pop().unwrap();
527525
}
528526

529527
fn print_break(&mut self, b: BreakToken, l: isize) {

0 commit comments

Comments
 (0)