No need to match expand pop, just return it (#1154)
This commit is contained in:
parent
82a7dc9dcc
commit
556af1624c
@ -36,10 +36,7 @@ impl<T> ArrayStack<T> {
|
||||
|
||||
/* 出栈 */
|
||||
fn pop(&mut self) -> Option<T> {
|
||||
match self.stack.pop() {
|
||||
Some(num) => Some(num),
|
||||
None => None,
|
||||
}
|
||||
self.stack.pop()
|
||||
}
|
||||
|
||||
/* 访问栈顶元素 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user