Er, actually the replacement would be:
```rust
for (i, p) in permutations.mut_iter().enumerate() { *p = i as i32; }
```
...which is even less appealing compared to the current approach.