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

Add ArrayVecCopy V2 #261

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add ArrayVecCopy V2 #261

wants to merge 4 commits into from

Conversation

pYtoner
Copy link

@pYtoner pYtoner commented Feb 9, 2024

New version of closed: #193

Made a copy of ArrayVec (ArrayVecCopy) that can only hold Copy items.

This means copying all of its relevant functions and relevant tests.

Closes #32

@pYtoner pYtoner mentioned this pull request Feb 9, 2024
@pYtoner
Copy link
Author

pYtoner commented Feb 9, 2024

Unfortunately miri says there is UB in quite a few places.

Tests with UB are:

  1. test_retain - caused by ArrayVecCopy::retain
  2. test_drain_range_inclusive - caused by ArrayVecCopy::drain
  3. test_drain - caused by ArrayVecCopy::drain
  4. test_pop_at - caused by ArrayVecCopy::drain

After trying for a bit I am not going to fix this UB myself. I am not proficient enough with unsafe yet.

@bluss bluss self-requested a review March 7, 2024 19:28
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.

Feature Request: ArrayVec that is Copy
1 participant