Commit 70d4f26
committed
RangeFrom::step_by docs: fix example
The previous example did not do what its description said. In it panicked on integer overflow in debug mode, and went into an infinite loop in release mode (wrapping back to 0 after printing 254).1 parent 1972c50 commit 70d4f26
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4252 | 4252 | | |
4253 | 4253 | | |
4254 | 4254 | | |
4255 | | - | |
4256 | | - | |
| 4255 | + | |
| 4256 | + | |
| 4257 | + | |
| 4258 | + | |
4257 | 4259 | | |
4258 | 4260 | | |
4259 | 4261 | | |
4260 | 4262 | | |
4261 | | - | |
| 4263 | + | |
4262 | 4264 | | |
4263 | 4265 | | |
4264 | 4266 | | |
| |||
0 commit comments