You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently these structures expose potentially invalid (uninitialized) data. This should be avoided in Rust. I'd suggest to make data and dlc fields private and provide data() method returning slice. Further, provide push_byte() and push_slice() methods for appending bytes.
Also data should probably use MaybeUninit<u8> instead of u8, but only after MaybeUninit is stabilized.
The text was updated successfully, but these errors were encountered:
Currently these structures expose potentially invalid (uninitialized) data. This should be avoided in Rust. I'd suggest to make
data
anddlc
fields private and providedata()
method returning slice. Further, providepush_byte()
andpush_slice()
methods for appending bytes.Also
data
should probably useMaybeUninit<u8>
instead ofu8
, but only afterMaybeUninit
is stabilized.The text was updated successfully, but these errors were encountered: