summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2022-01-18 19:15:38 -0800
committerDavid Tolnay <dtolnay@gmail.com>2022-01-18 19:16:33 -0800
commitae28ec5a9c09b0ea163ccdff26b5650d4d0ea3c0 (patch)
treec7e247720809a9bd2f1a58bc1271539ac96d9163
parent2a14275500b5c9cddfab83bb606368a9a4192ea4 (diff)
downloadrust-ae28ec5a9c09b0ea163ccdff26b5650d4d0ea3c0.tar.gz
Inline Printer's scan_pop_bottom method
-rw-r--r--compiler/rustc_ast_pretty/src/pp.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_ast_pretty/src/pp.rs b/compiler/rustc_ast_pretty/src/pp.rs
index 4aeb4e4807b..e5542eda596 100644
--- a/compiler/rustc_ast_pretty/src/pp.rs
+++ b/compiler/rustc_ast_pretty/src/pp.rs
@@ -337,7 +337,7 @@ impl Printer {
fn check_stream(&mut self) {
if self.right_total - self.left_total > self.space {
if Some(&self.left) == self.scan_stack.back() {
- let scanned = self.scan_pop_bottom();
+ let scanned = self.scan_stack.pop_back().unwrap();
self.buf[scanned].size = SIZE_INFINITY;
}
self.advance_left();
@@ -347,10 +347,6 @@ impl Printer {
}
}
- fn scan_pop_bottom(&mut self) -> usize {
- self.scan_stack.pop_back().unwrap()
- }
-
fn advance_left(&mut self) {
let mut left_size = self.buf[self.left].size;