You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bc58587
Browse filesBrowse the repository at this point in the historyBrowse files
Require strictly increasing patch indices (#11181)
## Summary
`Patches::new` now checks, in debug builds, that patch indices are
strictly increasing instead of only sorted. Nothing in the workspace
produces repeated indices; only hand-built tests did. The paths that
handle them also disagree: `search_index` returns the first patch at a
repeated index, while decoding keeps the last.
## Changes
- `Patches::new` asserts `is_strict_sorted`; the `new_unchecked` safety
contract says "strictly increasing".
- Remove the repeated-index handling: the last-wins skip in
`append_patch_walk_to_varbin`, and the repeated-position checks in
`execute_sparse_lists` and `lists::can_use_native_list`.
- Remove `test_append_utf8_with_duplicate_patch_indices` and the
`repeated_position` cases from the sparse list tests added in #11173;
add `test_new_rejects_repeated_indices`.
## Testing
- `test_new_rejects_repeated_indices` (debug builds only).
---------
Signed-off-by: Matt Katz <[email protected]>
0 commit comments