▲ | swiftcoder 5 days ago | |
Theoretically you can construct a loop counter that overflows, but I don't that there is any reasonable way to do it accidentally? Within safe rust you would likely need to be using an explicit .wrapping_add() on your counter, and explicitly constructing a for loop that wasn't range-based... | ||
▲ | tekne 5 days ago | parent [-] | |
Well, in debug mode yes, but in release mode overflow is wrapping by default unless you explicitly set a flag to make it panic. |