Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ae28ec5

Browse files
committed
Inline Printer's scan_pop_bottom method
1 parent 2a14275 commit ae28ec5

File tree

1 file changed

+1
-5
lines changed
  • compiler/rustc_ast_pretty/src

1 file changed

+1
-5
lines changed

compiler/rustc_ast_pretty/src/pp.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl Printer {
337337
fn check_stream(&mut self) {
338338
if self.right_total - self.left_total > self.space {
339339
if Some(&self.left) == self.scan_stack.back() {
340-
let scanned = self.scan_pop_bottom();
340+
let scanned = self.scan_stack.pop_back().unwrap();
341341
self.buf[scanned].size = SIZE_INFINITY;
342342
}
343343
self.advance_left();
@@ -347,10 +347,6 @@ impl Printer {
347347
}
348348
}
349349

350-
fn scan_pop_bottom(&mut self) -> usize {
351-
self.scan_stack.pop_back().unwrap()
352-
}
353-
354350
fn advance_left(&mut self) {
355351
let mut left_size = self.buf[self.left].size;
356352

0 commit comments

Comments
 (0)