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

Avoid use of unsafe for Vec storage #603

Closed
wants to merge 1 commit into from

Conversation

philipc
Copy link
Collaborator

@philipc philipc commented Nov 3, 2021

This change is intended to be transparent to users. However, I did have to add a T: Clone bound for implementations of ArrayLike.

r? @nbdd0121

@philipc
Copy link
Collaborator Author

philipc commented Nov 3, 2021

I don't know how to fix the 1.42 build, so might have to leave this for later.

@philipc
Copy link
Collaborator Author

philipc commented Mar 12, 2024

This isn't going to land in its current state. The basic idea is to add a new trait for Vec operations to allow direct use of Vec, instead of needing to wrap it in ArrayVec. This new trait is implemented for both Vec and ArrayVec. Except it needs to be split in two traits because we don't expose ArrayVec in the public API. This PR currently renames traits, but I think it would have been better to leave ArrayLike as is and add a new VecLike trait.

Additionally, to enable deriving of traits like Clone, we then we need to put the Vec/ArrayVec in a newtype and manually implement those traits, but this PR didn't do that yet.

@philipc philipc closed this Mar 12, 2024
@philipc philipc deleted the arrayvec branch March 12, 2024 08:18
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