Use chunks (or chunks_mut if you need mutability): fn main() { let things = [5, 4, 3, 2, 1]; for slice in things.chunks(2) { println!("{:?} ...
確定! 回上一頁