Commit 5c13042
committed
Auto merge of #84135 - rust-lang:GuillaumeGomez-patch-1, r=kennytm
Improve code example for length comparison
Small fix/improvement: it's much safer to check that you're under the length of an array rather than chacking that you're equal to it. It's even more true in case you update the length of the array while iterating.1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2567 | 2567 | | |
2568 | 2568 | | |
2569 | 2569 | | |
2570 | | - | |
| 2570 | + | |
2571 | 2571 | | |
2572 | 2572 | | |
2573 | 2573 | | |
| |||
0 commit comments