我在 Rust 中有一个 for 循环,在满足的条件下我想重新运行循环的一部分。例如:
for mut n in 0..vector.len(){ ... if condition { n = 3; } }
但在下一次迭代中n不是 3,循环继续。有任何想法吗?
n
rust
rust ×1