Hello!
It's entirely possible I may have misunderstood something, but when creating an inconsistent union error in the rust verifier, it looks like the names of the type and value fields are the wrong way round. In the verifier, they are passed in the order type, then value:
|
return InvalidFlatbuffer::new_inconsistent_union( |
|
format!("{}_type", field.name()), |
|
field.name().to_string(), |
|
)?; |
But the new_inconsistent_union function expects them in the order value, then type:
|
pub fn new_inconsistent_union<T>( |
|
field: impl Into<Cow<'static, str>>, |
|
field_type: impl Into<Cow<'static, str>>, |
|
) -> Result<T> { |
Which then leads to errors that are slightly confusing.
Hello!
It's entirely possible I may have misunderstood something, but when creating an inconsistent union error in the rust verifier, it looks like the names of the type and value fields are the wrong way round. In the verifier, they are passed in the order type, then value:
flatbuffers/rust/reflection/src/reflection_verifier.rs
Lines 399 to 402 in 4e582b0
But the
new_inconsistent_unionfunction expects them in the order value, then type:flatbuffers/rust/flatbuffers/src/verifier.rs
Lines 187 to 190 in 4e582b0
Which then leads to errors that are slightly confusing.