-
Notifications
You must be signed in to change notification settings - Fork 27
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
Use native Rust references instead of wrappers #169
Conversation
Is this still WIP? |
A few things left to clean up, should finish this weekend |
0e9a428
to
53784fc
Compare
@boxdot ready for review |
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.
There are still some clippy warning. But I think they are not that important and we can fix them after this is merged.
|
||
/// Number of elements in the vector. | ||
#[inline] | ||
pub fn len(&self) -> usize { |
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.
Any reason for removing this?
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.
You get it for free from Deref<&[T]> (like most other slice functions I removed)
flatdata-generator/flatdata/generator/templates/rust/rust.jinja2
Outdated
Show resolved
Hide resolved
Note: This is a breaking change! Changes: * A struct transparently wraps a byte array of correct size * Instead of Ref/RefMute &Struct and &mut Struct are used * ArrayView is replaced by native slices * Archives store members with 'static lifetime, instead of constructing them all the time from pointers Signed-off-by: Christian Vetter <christian.vetter@here.com>
Signed-off-by: Christian Vetter <christian.vetter@here.com>
Signed-off-by: Christian Vetter <christian.vetter@here.com>
Signed-off-by: Christian Vetter <christian.vetter@here.com>
Impressive! |
Note: This is a breaking change!
Changes: