Skip to content
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

Implement Bounded Iterator #5

Closed
Nemo157 opened this issue Jan 3, 2015 · 1 comment · Fixed by #92 or #115
Closed

Implement Bounded Iterator #5

Nemo157 opened this issue Jan 3, 2015 · 1 comment · Fixed by #92 or #115
Milestone

Comments

@Nemo157
Copy link
Collaborator

Nemo157 commented Jan 3, 2015

Waiting on Bound to be merged with rust-lang/rust#20082.

§ describing bounded iterators in the RFC

fn range(&self, min: Bound<u32>, max: Bound<u32>) -> RangedItems<'a, u32>;
@Nemo157 Nemo157 removed the blocked label Jan 18, 2015
@Nemo157 Nemo157 added this to the 1.0 milestone Jan 18, 2015
@Nemo157
Copy link
Collaborator Author

Nemo157 commented Oct 5, 2020

@Nemo157 Nemo157 removed the blocked label Oct 5, 2020
@Kerollmops Kerollmops linked a pull request Oct 18, 2021 that will close this issue
8 tasks
Kerollmops pushed a commit that referenced this issue Oct 18, 2021
…move_range to accept `RangeBounds`; Fix boundary issue;
@bors bors bot closed this as completed in 719b7aa Oct 20, 2021
@bors bors bot closed this as completed in #92 Oct 20, 2021
not-jan pushed a commit to not-jan/roaring-rs that referenced this issue Aug 31, 2022
…ove_range} and Treemap::remove_range to accept `RangeBounds`; Fix boundary issue;
not-jan pushed a commit to not-jan/roaring-rs that referenced this issue Aug 31, 2022
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant