mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-25 01:16:31 +08:00
No need to match expand pop, just return it (#1154)
This commit is contained in:
parent
82a7dc9dcc
commit
556af1624c
1 changed files with 1 additions and 4 deletions
|
@ -36,10 +36,7 @@ impl<T> ArrayStack<T> {
|
||||||
|
|
||||||
/* 出栈 */
|
/* 出栈 */
|
||||||
fn pop(&mut self) -> Option<T> {
|
fn pop(&mut self) -> Option<T> {
|
||||||
match self.stack.pop() {
|
self.stack.pop()
|
||||||
Some(num) => Some(num),
|
|
||||||
None => None,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 访问栈顶元素 */
|
/* 访问栈顶元素 */
|
||||||
|
|
Loading…
Reference in a new issue