mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 06:28:06 +00:00
fix(flatbuffers): use manual impl Default for struct object types (#8947)
* fix(flatbuffers): use manual impl Default for struct object types * fix: handle bool and float zero literals in struct object Default impl * fix: regenerate all test bindings with generate_code.py * fix: data type check on swift build * fix: test large array on struct and enum
This commit is contained in:
@@ -149,11 +149,19 @@ impl<'a> StructInNestedNS {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Default)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct StructInNestedNST {
|
||||
pub a: i32,
|
||||
pub b: i32,
|
||||
}
|
||||
impl Default for StructInNestedNST {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
a: 0,
|
||||
b: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl StructInNestedNST {
|
||||
pub fn pack(&self) -> StructInNestedNS {
|
||||
|
||||
Reference in New Issue
Block a user