-
Notifications
You must be signed in to change notification settings - Fork 85
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
Rework the insert/remove_range functions with RangeBounds #92
Conversation
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.
Brief hello from this-week-in-rust 👋🏾
a5e5465
to
fa8b38a
Compare
14376a0
to
b27dc3c
Compare
Hey @oliverdding, Could you please do a last review before I merge that? It is safe enough as you and I added more tests, but can you take a look at the files, please? Just to make sure my rebasing didn't break anything? |
Hi @Kerollmops It's my pleasure. |
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.
I found one thing left to be changed, and two for discussion.
Thank you very much for your review @oliverdding, I have applied your advice and will merged just after your last review 🫖 |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild succeeded: |
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.
It seems nice to me :)
Thank you for the last review! |
Build succeeded: |
92: Rework the insert/remove_range functions with RangeBounds r=Kerollmops a=Kerollmops This PR fixes RoaringBitmap#5 by reworking the `Bitmap::insert_range` and `Bitmap::remove_range` functions to accept any type that implement [the `RangeBounds` trait](https://doc.rust-lang.org/nightly/core/ops/trait.RangeBounds.html). Note that it is a breaking change and therefore involves bumping the crate version carefully. The current version of all these functions was accepting an [exclusive `Range<u64>`](https://doc.rust-lang.org/nightly/core/ops/struct.Range.html) to let user define all possible integers in the range `0` to `u32::MAX`, but as it is an exclusive range, a `u64` was required. `@josephglanville,` could you please take a look at this PR? When you got time 😃 Co-authored-by: Clément Renault <[email protected]> Co-authored-by: oliverdding <[email protected]> Co-authored-by: Kerollmops <[email protected]>
This PR fixes #5 by reworking the
Bitmap::insert_range
andBitmap::remove_range
functions to accept any type that implement theRangeBounds
trait. Note that it is a breaking change and therefore involves bumping the crate version carefully.The current version of all these functions was accepting an exclusive
Range<u64>
to let user define all possible integers in the range0
tou32::MAX
, but as it is an exclusive range, au64
was required.@josephglanville, could you please take a look at this PR? When you got time 😃