-
Notifications
You must be signed in to change notification settings - Fork 130
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
Feature Request: ArrayVec that is Copy #32
Comments
It's a relevant question. I have considered making a Copy-only ArrayVec, but most of the hard things this library does are for the non-Copy part to be correct. The Copy case is simple, so a regular array is often enough. |
Would you accept a |
I'm not sure, it requires duplicating the whole thing. As said above, the most interesting things ArrayVec does is handle the non-Copy case correctly. I guess this is not what you want, but maybe specialization (unstable feature) can be used to make ArrayVec Copy exactly when its elements are Copy. |
a PoC of copy-specialization works. This is the ideal approach since it transparently removes the overhead of non-copy arrayvecs (overwrite in drop etc). The use of unstable features is rather non-ideal though. |
This issue isn't very high priority for me, I'm happy waiting until specialization stabilises if that suits you best 👍 |
We don't even know if specialization will allow this, but we'll see. |
It sounds like this is no longer just a question but a feature request? |
I'm not sure that this needs a breaking change. |
arrayvec as a crate needs it. It's part of clearing the air before adding new features, if you will. |
Where the most significant breaking change is the change of minimum Rust version |
What is the status of this feature? |
Is this maybe easier to do now with the new array based implementation in 0.7? |
I’d be interested in this feature, is #193 on the right way to be merged ? thanks :) |
I'm considering using an
ArrayVec<[_; 9]>
as a small stack to keep track of pressed buttons on a mouse in conrod, however I noticed that it does not implCopy
. Seeing as it has a fixed-size, shouldn't derivingCopy
be ok? Or is there some other boundary stopping this?The text was updated successfully, but these errors were encountered: