-
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
Add ArrayVecCopy V2 #261
base: master
Are you sure you want to change the base?
Add ArrayVecCopy V2 #261
Conversation
Unfortunately miri says there is UB in quite a few places. Tests with UB are:
After trying for a bit I am not going to fix this UB myself. I am not proficient enough with unsafe yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder how to keep the whole thing maintainable. If possible, the arrayvec_copy
module should be mostly kept in sync with the arrayvec
module. Perhaps one could put up a diff plus some search/replace that generates the arrayvec_copy
module?
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "arrayvec" | |||
version = "0.7.4" | |||
version = "0.8.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a breaking change. Is there any?
@@ -42,6 +42,7 @@ harness = false | |||
[features] | |||
default = ["std"] | |||
std = [] | |||
copy = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's necessary to gate this behind a feature.
mod arrayvec_copy; | ||
#[cfg(feature = "copy")] | ||
pub mod copy { | ||
pub use crate::arrayvec_copy::{ArrayVecCopy, IntoIter, Drain}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps only keep the iterator types in here and expose the ArrayVecCopy
globally.
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