Commit d4a60ab
committed
Update the examples in
The examples added in rust-lang#60396 used a "clever" post-increment hack,
unrelated to the actual point of the examples. That hack was found
[confusing] in the users forum, and rust-lang#81811 already changed the `Vec`
example to use a more direct iterator. This commit changes `String` and
`VecDeque` in the same way for consistency.
[confusing]: https://users.rust-lang.org/t/help-understand-strange-expression/62858String and VecDeque::retain
1 parent b708886 commit d4a60ab
2 files changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2107 | 2107 | | |
2108 | 2108 | | |
2109 | 2109 | | |
2110 | | - | |
| 2110 | + | |
| 2111 | + | |
2111 | 2112 | | |
2112 | 2113 | | |
2113 | 2114 | | |
| |||
2116 | 2117 | | |
2117 | 2118 | | |
2118 | 2119 | | |
2119 | | - | |
2120 | | - | |
| 2120 | + | |
| 2121 | + | |
2121 | 2122 | | |
2122 | 2123 | | |
2123 | 2124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1350 | 1350 | | |
1351 | 1351 | | |
1352 | 1352 | | |
1353 | | - | |
| 1353 | + | |
| 1354 | + | |
1354 | 1355 | | |
1355 | 1356 | | |
1356 | 1357 | | |
1357 | 1358 | | |
1358 | | - | |
1359 | | - | |
| 1359 | + | |
| 1360 | + | |
1360 | 1361 | | |
1361 | 1362 | | |
1362 | 1363 | | |
| |||
0 commit comments