No need to match expand pop, just return it (#1154)

pull/1185/head
rongyi 8 months ago committed by GitHub
parent 82a7dc9dcc
commit 556af1624c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save