Skip to content

Commit 9d23df4

Browse files
committed
Rollup merge of #26792 - tshepang:follow-idiom, r=steveklabnik
2 parents 3b3cdb1 + da90ddb commit 9d23df4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/doc/reference.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -2976,10 +2976,8 @@ function argument, and we then call it with a lambda expression as an argument:
29762976

29772977
```
29782978
fn ten_times<F>(f: F) where F: Fn(i32) {
2979-
let mut i = 0i32;
2980-
while i < 10 {
2981-
f(i);
2982-
i += 1;
2979+
for index in 0..10 {
2980+
f(index);
29832981
}
29842982
}
29852983

0 commit comments

Comments
 (0)