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

Mirror optimization of std::Vec::retain (rust-lang/rust#81126) #174

Merged
merged 3 commits into from Mar 29, 2021

Conversation

@niklasf
Copy link
Contributor

@niklasf niklasf commented Feb 19, 2021

Looks like the optimization from rust-lang/rust#81126 applies also to ArrayVec.

src/arrayvec.rs Outdated Show resolved Hide resolved
src/arrayvec.rs Outdated Show resolved Hide resolved
@niklasf niklasf force-pushed the niklasf:optimize-retain branch from 200f0a3 to b9e755c Feb 22, 2021
@niklasf
Copy link
Contributor Author

@niklasf niklasf commented Feb 22, 2021

Ah, indeed. I was confused how this could be fine in std and not here, but the closure in std takes a shared reference.

@bluss
Copy link
Owner

@bluss bluss commented Feb 22, 2021

I pushed a fix on master to the doc build issue in CI, and we can merge this after it runs ok again

@bluss
bluss approved these changes Feb 22, 2021
@bluss bluss force-pushed the niklasf:optimize-retain branch from b9e755c to b82a6d4 Mar 29, 2021
@bluss
Copy link
Owner

@bluss bluss commented Mar 29, 2021

Rebased and updated syntactically for const generics

@bluss bluss merged commit 6b9faa7 into bluss:master Mar 29, 2021
5 checks passed
5 checks passed
@github-actions
tests (1.51.0, serde, false)
Details
@github-actions
tests (stable, false)
Details
@github-actions
tests (beta, serde, false)
Details
@github-actions
tests (nightly, serde, false)
Details
@github-actions
miri
Details
bluss added a commit that referenced this pull request Mar 30, 2021
@bluss bluss added this to the 0.7.0 milestone Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants