Repository navigation
Fix NextAbsentValue and PreviousAbsentValue - #579
Merged
Merged
Conversation
keyspace is already key<<16. 1<<16 and -1 mean the container is exhausted. Drop the notes that retell the old safeMinimum and safeMaximum checks, and correct nextAbsentValue's sentinel.
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.
Description
Same fix as #578 for
NextAbsentValueandPreviousAbsentValue, with the comments trimmed. Supersedes #578.The behaviour change is Akron's commit. The follow-up only edits comments.
Type of Change
Changes Made
What was changed?
NextAbsentValueandPreviousAbsentValue, plus the array and bitmap container helpers, as in Fix NextAbsentValue and PreviousAbsentValue #578keyspaceis alreadykey<<16, and1<<16/-1mean the container is exhaustedbitmapContainer.nextAbsentValueno longer says an out-of-range target returns-1Why was it changed?
safeMaximum/safeMinimumchecks instead of the invariant.How was it changed?
Testing
go testpassed.Formatting
gofmtreports no diff.Fuzzing
Not run. The second commit does not change behaviour.
Performance Impact
None. No benchmarks cover these methods.
Breaking Changes
No, unless a caller depended on the old wrong results.
Related Issues
Supersedes #578.
Additional Notes
Please close #578 in favour of this branch.