mirror of https://github.com/sunface/rust-course
The following snippet can run without an error:
```rust
let mut a = [ 0, 1, 2, 3, 4 ];
let mut ind = 0;
for num in a {
println!("{}", num);
if ind+1 < a.len() {
a[ind+1] *= 10;
}
ind += 1;
}
println!("{:?}", a);
```
pull/451/head
parent
007b0cabcf
commit
7e28f3ec84
Loading…
Reference in new issue