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

Replace Vec remove by a retain_mut function in Container operations #85

Merged
merged 3 commits into from
Jan 23, 2021

Conversation

Kerollmops
Copy link
Member

@Kerollmops Kerollmops commented Jan 22, 2021

We introduce a retain_mut function that allows us to mutate the iterated element. There already were a discussion about this Vec::retain parameter restriction.

Using the retain algorithm is much better when multiple stores must be removed in one batch, same as in #83.

@Kerollmops
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jan 23, 2021
@bors
Copy link
Contributor

bors bot commented Jan 23, 2021

try

Build failed:

@Kerollmops
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 23, 2021

Build succeeded:

@bors bors bot merged commit 077f7eb into master Jan 23, 2021
@bors bors bot deleted the retain-mut branch January 23, 2021 10:14
not-jan pushed a commit to not-jan/roaring-rs that referenced this pull request Aug 31, 2022
85: Replace Vec remove by a retain_mut function in Container operations r=Kerollmops a=Kerollmops

We introduce a `retain_mut` function that allows us to mutate the iterated element. There already were [a discussion about this `Vec::retain` parameter restriction](rust-lang/rust#25477).

Using the `retain` algorithm is much better when multiple stores must be removed in one batch, same as in RoaringBitmap#83.

Co-authored-by: Clément Renault <clement@meilisearch.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant