Idiomatic rust (#1364)

This commit is contained in:
rongyi
2024-05-15 18:16:55 +08:00
committed by GitHub
parent 9e569cf520
commit 840692acce

View File

@@ -9,7 +9,7 @@
/* 移动一个圆盘 */
fn move_pan(src: &mut Vec<i32>, tar: &mut Vec<i32>) {
// 从 src 顶部拿出一个圆盘
let pan = src.remove(src.len() - 1);
let pan = src.pop().unwrap();
// 将圆盘放入 tar 顶部
tar.push(pan);
}