Skip to content

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

Merged
bors[bot] merged 3 commits into
masterfrom
retain-mut
Jan 23, 2021
Merged

bors[bot] merged 3 commits into
masterfrom
retain-mut

Conversation

@Kerollmops

@Kerollmops Kerollmops commented Jan 22, 2021 •

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

bors try

bors Bot added a commit that referenced this pull request Jan 23, 2021
@bors

bors Bot commented Jan 23, 2021

Copy link
Copy Markdown
Contributor

try

Build failed:

@Kerollmops

Copy link
Copy Markdown
Member Author

bors r+

@bors

bors Bot commented Jan 23, 2021

Copy link
Copy Markdown
Contributor

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.

1 participant