Why is this unaligned?!
The Rust Programming Language Forum
Why is this unaligned?!
I have a struct of two u64's, and the code that tries ref_from_bytes, crashes, even though alignment is 8, and the slice is a multiple of 8. Even if I try a slice multiple of 16 (336..352 instead of 328..344), it still shows the same error message. What am I doing wrong? /* [dependencies] zerocopy = {version = "0.8", features=["std", "derive"]} */ use zerocopy::{FromBytes, Immutable, KnownLayout}; #[derive(Debug, Clone, KnownLayout, FromBytes, Immutable)] struct MyStruct { first: u64, se...
0 comments
No comments yet.