Comment Comment by holmium you can do it that way if you wanted to let mut i = 0; for item in items { item.method(i); i += 1; } I don't know why you'd it that way, but Rust definitely isn't stopping you from doing that.e: and as running example: https://play.rust-lang.org/?version=stable&mode=debug&editio... parent holmium 3 years ago
e: and as running example: https://play.rust-lang.org/?version=stable&mode=debug&editio...