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::drain_filter removal of empty pages with Vec::retain #5

Merged
merged 1 commit into from Oct 24, 2023

Conversation

devyn
Copy link
Contributor

@devyn devyn commented Oct 18, 2023

Modern versions of Rust nightlies have renamed Vec::drain_filter to Vec::extract_if and changed the semantics slightly, but we actually don't even need it, because stable Rust has Vec::retain and we don't need to do anything with the removed pages.

Benchmark results are within margin of error either way, and it simplifies the code.

Modern versions of Rust nightlies have renamed `Vec::drain_filter` to
`Vec::extract_if` and changed the semantics slightly, but we actually
don't even need it, because stable Rust has `Vec::retain` and we don't
need to do anything with the removed pages.
@notflan
Copy link
Owner

notflan commented Oct 24, 2023

Ah that's useful.
Will merge and update package on crates.io.
Thanks <3

@notflan notflan merged commit fa8fc30 into notflan:master Oct 24, 2023
notflan added a commit that referenced this pull request Oct 24, 2023
…raph (#4). Replace removed nightly `Vec::drain_filter`, replace with stable `Vec::retain` (#5).

Fortune for smallmap's current commit: Curse − 凶
@devyn
Copy link
Contributor Author

devyn commented Oct 24, 2023

Thanks!

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

2 participants