mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Replace if
+ unwrap
with if let
in check_stack
This commit is contained in:
parent
80139a0f02
commit
947a09a4a8
@ -379,8 +379,7 @@ impl Printer {
|
||||
}
|
||||
|
||||
fn check_stack(&mut self, k: usize) {
|
||||
if !self.scan_stack.is_empty() {
|
||||
let x = *self.scan_stack.front().unwrap();
|
||||
if let Some(&x) = self.scan_stack.front() {
|
||||
match self.buf[x].token {
|
||||
Token::Begin(_) => {
|
||||
if k > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user