Commit f645628
committed
Auto merge of rust-lang#119285 - lch361:split-no-panic, r=the8472
Removed redundant bounds checking at Split's next and next_back methods
Since these methods are using `Iterator::rposition`, which always returns a valid index, then there is no point in regular indexing with bounds checking1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
462 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
463 | 467 | | |
464 | 468 | | |
465 | 469 | | |
| |||
491 | 495 | | |
492 | 496 | | |
493 | 497 | | |
494 | | - | |
495 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
496 | 504 | | |
497 | 505 | | |
498 | 506 | | |
| |||
0 commit comments