This commit is contained in:
krahets
2023-11-14 21:31:21 +08:00
parent d5a58e0deb
commit c7794e1a84
5 changed files with 20 additions and 20 deletions

View File

@ -288,7 +288,7 @@ comments: true
stack.push(4);
/* 访问栈顶元素 */
let top = stack[stack.len() - 1];
let top = stack.last().unwrap();
/* 元素出栈 */
let pop = stack.pop().unwrap();