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:
Renzo
2026-03-06 11:20:32 -08:00
committed by GitHub
parent 57659d9f38
commit 292870612c
37 changed files with 2181 additions and 27 deletions

View File

@@ -264,7 +264,7 @@ impl<'a> Vec3 {
}
}
#[derive(Debug, Clone, PartialEq, Default)]
#[derive(Debug, Clone, PartialEq)]
pub struct Vec3T {
pub x: f32,
pub y: f32,
@@ -273,6 +273,18 @@ pub struct Vec3T {
pub test2: Color,
pub test3: TestT,
}
impl Default for Vec3T {
fn default() -> Self {
Self {
x: 0.0,
y: 0.0,
z: 0.0,
test1: 0.0,
test2: Default::default(),
test3: Default::default(),
}
}
}
impl Vec3T {
pub fn pack(&self) -> Vec3 {