78cde5b9fb
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
9 lines
152 B
Rust
9 lines
152 B
Rust
pub fn main() {
|
|
let mut count = 0;
|
|
do 999_999.times() {
|
|
count += 1;
|
|
}
|
|
assert_eq!(count, 999_999);
|
|
printfln!("%u", count);
|
|
}
|