Based on the docs from the stdlib, when calling align_to, it's possible for the entirety of the data to be returned in the prefix, or suffix slices:
This method splits the slice into three distinct slices: prefix, correctly aligned middle slice of a new type, and the suffix slice. The method may make the middle slice the greatest length possible for a given type and input slice, but only your algorithm’s performance should depend on that, not its correctness. It is permissible for all of the input data to be returned as the prefix or suffix slice.
This PR updates our use of .align_to to make sure the both the prefix slice and suffix slice are empty, thus guaranteeing the middle slice contains all of our data
Based on the docs from the stdlib, when calling
align_to
, it's possible for the entirety of the data to be returned in the prefix, or suffix slices:This PR updates our use of
.align_to
to make sure the both the prefix slice and suffix slice are empty, thus guaranteeing the middle slice contains all of our data