mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-02 01:23:59 +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:
@@ -215,13 +215,23 @@ impl<'a> PossiblyReservedWords {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Default)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct PossiblyReservedWordsT {
|
||||
pub follow_: f32,
|
||||
pub push_: f32,
|
||||
pub size: f32,
|
||||
pub alignment: f32,
|
||||
}
|
||||
impl Default for PossiblyReservedWordsT {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
follow_: 0.0,
|
||||
push_: 0.0,
|
||||
size: 0.0,
|
||||
alignment: 0.0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl PossiblyReservedWordsT {
|
||||
pub fn pack(&self) -> PossiblyReservedWords {
|
||||
|
||||
Reference in New Issue
Block a user