Finish 0.8.0: stale deprecation fix + deprecate split_at / add split_at_offset - #123
Merged
Conversation
The `ResolveError` alias was annotated `#[deprecated(since = "0.7.2")]`, but 0.7.2 was never published (the releases went 0.7.0 [yanked] -> 0.7.1 -> 0.8.0). It first ships deprecated in 0.8.0, so correct the `since`. Claude-Session: https://claude.ai/code/session_01XGvHsB4a2dxDVUQDGBScnW
Folds in the substance of #89 (authored by chanced), rebased onto current main and finished off: - `split_at` is offset-based, but the rest of the API (`get`, etc.) is index-based. Rename the offset-based split to `split_at_offset` and deprecate `split_at`, reserving that name to be reintroduced as an index-based split by 1.0. - Point the internal `strip`/parent caller at `split_at_offset` so the crate doesn't warn on its own deprecation. - Add unit tests for `split_at_offset` (separator and non-separator offsets, plus out-of-bounds offsets that must return None rather than panic) and a test confirming the deprecated `split_at` still delegates. These cover the lines #89 left untested. - Fix the doctest that #89 left calling the deprecated `split_at`. Claude-Session: https://claude.ai/code/session_01XGvHsB4a2dxDVUQDGBScnW
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the 0.8.0 release prep. #122 was merged early and only captured its first commit (the CI unblock + version bump), leaving two follow-up commits stranded on the merged branch. This lands them on
mainbefore 0.8.0 is tagged/published.Changes
ResolveErroralias was marked#[deprecated(since = "0.7.2")], but 0.7.2 was never published (0.7.0 [yanked] → 0.7.1 → 0.8.0). Corrected to0.8.0.Pointer::split_at, addPointer::split_at_offset— folds in the substance of DeprecatesPointer::split_at, addsPointer::split_at_offset#89 (originally by @chanced), rebased onto currentmain:split_atis offset-based, but the rest of the API (get, …) is index-based. The offset-based split is renamed tosplit_at_offset;split_atis deprecated and its name reserved to be reintroduced as an index-based split by 1.0.split_at_offsetso the crate doesn't warn on its own deprecation.Pointer::split_at, addsPointer::split_at_offset#89 left untested — and fixed the doctest DeprecatesPointer::split_at, addsPointer::split_at_offset#89 left calling the deprecated method.After merge
main:git tag v0.8.0 && git push --tags, thencargo publish.Pointer::split_at, addsPointer::split_at_offset#89 can be closed as superseded.Supersedes #89.