-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify the from_sorted_iter and append methods to return a Result #106
Merged
Conversation
This file contains 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
Kerollmops
added
the
breaking
This change will require a bump of the minor or major version.
label
May 25, 2021
bors try |
tryBuild succeeded: |
MarinPostma
suggested changes
May 31, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the late review. LGTM modulo doc edits :)
Kerollmops
force-pushed
the
failible-from-sorted-iter
branch
2 times, most recently
from
June 1, 2021 09:02
c04ac3d
to
b4e03f5
Compare
bors try |
tryMerge conflict. |
Kerollmops
force-pushed
the
failible-from-sorted-iter
branch
from
June 1, 2021 09:35
4dd7129
to
4071a6d
Compare
bors try |
tryBuild failed: |
Kerollmops
force-pushed
the
failible-from-sorted-iter
branch
from
June 1, 2021 12:16
4071a6d
to
96bb121
Compare
bors try |
tryBuild succeeded: |
bors merge |
Merge conflict. |
Co-authored-by: marin <postma.marin@protonmail.com>
Kerollmops
force-pushed
the
failible-from-sorted-iter
branch
from
October 21, 2021 13:15
96bb121
to
df89194
Compare
bors merge |
Build succeeded: |
not-jan
pushed a commit
to not-jan/roaring-rs
that referenced
this pull request
Aug 31, 2022
106: Modify the from_sorted_iter and append methods to return a Result r=Kerollmops a=Kerollmops This PR fixes RoaringBitmap#103, which means that the `from_sorted_iter` and `append` methods of the `RoaringBit/Treemap` types now return a `Result`. The `Err` value corresponds to the number of values that we appended to the set until we found an erroneous value, it eases debugging. These two methods were containing bugs in the sense that they were silently discarding invalid values instead of panicking, this bug was introduced by RoaringBitmap#99 which introduced a non-panicking push method. A possible improvement could be to introduce a new error type, something like a `NonSortedIntegers` struct with a `stopped_at`/`valid_until` method that returns the `u64` we currently return as the `Err`. `@MarinPostma` could you please take a look at this PR? If you got the time? Co-authored-by: Kerollmops <clement@meilisearch.com> Co-authored-by: Clément Renault <renault.cle@gmail.com>
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.
This PR fixes #103, which means that the
from_sorted_iter
andappend
methods of theRoaringBit/Treemap
types now return aResult
. TheErr
value corresponds to the number of values that we appended to the set until we found an erroneous value, it eases debugging.These two methods were containing bugs in the sense that they were silently discarding invalid values instead of panicking, this bug was introduced by #99 which introduced a non-panicking push method.
A possible improvement could be to introduce a new error type, something like a
NonSortedIntegers
struct with astopped_at
/valid_until
method that returns theu64
we currently return as theErr
.@MarinPostma could you please take a look at this PR? If you got the time?