Closed AaronFeickert closed 3 months ago
Note that this does not include the uses already addressed by #6430.
3 files 116 suites 41m 43s :stopwatch: 1 301 tests 1 300 :white_check_mark: 0 :zzz: 1 :x: 3 785 runs 3 784 :white_check_mark: 0 :zzz: 1 :x:
For more details on these failures, see this check.
Results for commit 3b4dcdd5.
:recycle: This comment has been updated with latest results.
2 files 11 suites 24m 19s :stopwatch: 35 tests 33 :white_check_mark: 0 :zzz: 2 :x: 37 runs 35 :white_check_mark: 0 :zzz: 2 :x:
For more details on these failures, see this check.
Results for commit 3b4dcdd5.
I also didn't identify any particular problems with the existing implementation. As noted, this was to reduce risk going forward in the event of changes.
Description
Ensures that all slice splitting is properly checked to avoid panics.
Motivation and Context
There are a few remaining uses of
slice::split_at
that are used to split slices. Because this can panic on a bad index, this PR moves each use toslice::split_at_checked
, which cannot panic.How Has This Been Tested?
Existing tests pass.
What process can a PR reviewer use to test or verify this change?
Ensure that each split is still being done at the same index, and that the error handling is done properly.