When building the following schema using flatc --rust --gen-object-api hash_digest.fbs:
struct HashDigest {
size: uint8 (id: 0);
data: [uint8:64] (id: 1);
}
The generated object API rust code is:
#[derive(Debug, Clone, PartialEq, Default)]
pub struct HashDigestT {
pub size: u8,
pub data: [u8; 64],
}
This fails to build as there is no implementation of the Default trait for the array:
error[E0277]: the trait bound `[u8; 64]: Default` is not satisfied
This appears to be a bug and the expectation is that the generated code will build given this schema.
Tested with flatc version 25.12.19.