mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 13:33:05 +00:00
use ALIGN for Push::alignment in struct types (#8398)
* use ALIGN for Push::alignment in struct types * regenerate and add a test for struct alignment
This commit is contained in:
committed by
GitHub
parent
807adb73b2
commit
49061f8c7c
@@ -51,6 +51,10 @@ impl<'b> flatbuffers::Push for NestedStruct {
|
||||
let src = ::core::slice::from_raw_parts(self as *const NestedStruct as *const u8, Self::size());
|
||||
dst.copy_from_slice(src);
|
||||
}
|
||||
#[inline]
|
||||
fn alignment() -> flatbuffers::PushAlignment {
|
||||
flatbuffers::PushAlignment::new(8)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> flatbuffers::Verifiable for NestedStruct {
|
||||
|
||||
Reference in New Issue
Block a user