-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add remove_front
and remove_back
method
#253
Conversation
… length of the container
…sion-to-1.60.0 Bump Rust version to 1.65 and remove Bors
Co-authored-by: Joseph Glanville <jpg@jpg.id.au>
…un-containers Deserialize Run Containers
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.
Hey @shimatar0 👋, Could you please rebase on main?
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.
About both RoaringBitmap::remove_first/last
methods implementations. Would it be possible not to check the length before, as I am pretty sure it takes time to compute it? It is O(n)
where n
is the number of containers.
Can we find better names? I would prefer remove_front
and remove_back
to match the pop_front/back
API of the VecDeque
collection. What do you think?
Would it be possible to change the API of those too methods to accept u64
instead of usize
? It would be more consistent with the rest of the API and will work correctly on u32
computers.
… length of the container
…ing-rs into remove-first-last
Hey @shimatar0 👋, Could you please apply the suggestions of @Dr-Emann. We will look into rebasing your branch afterward. Unfortunately, the CI doesn't pass. Could you fix it too? Note: That's due to Clippy. |
@Dr-Emann's suggestion eliminates the need to know the length in advance:)
Renamed methods.
Use |
Hey! @Kerollmops 👋 Thanks for the your review.
|
remove_first
and remove_last
methodremove_front
and remove_back
method
Hey @Dr-Emann 👋 I wanted to thank you very much for this particularly good code review of yours! Always impressed by what you spot Have a nice weekend ☀️ |
What does this PR do?
n
elements method and remove the lastn
elements method