pub enum ValidateError {
/// sequences of zero sized types of dynamic length are forbidden by definition
/// see <https://github.com/near/borsh-rs/pull/202> and related ones
ZSTSequence,
}
a valid alternative might be to remove second commit and newly added module borsh/src/schema/container_ext/validate.rs,
and just remove MaxSizeError::ZSTSequenceNotArray variant and corresponding check
max_serialized_size
code moved fromborsh/src/schema_helpers.rs
toborsh/src/schema/container_ext/max_size.rs
max_serialized_size
made a method ofBorshSchemaContainer
borsh::MaxSizeError
moved toborsh::schema::SchemaMaxSerializedSizeError
SchemaMaxSerializedSizeError::MissingDefinition
->SchemaMaxSerializedSizeError::MissingDefinition(Declaration)
is_zero_size
private function tries to detect recursion too, its return type changed toResult<bool, ()>
(Err
on recursive call)MaxSizeError::ZSTSequenceNotArray
check and enum variant split into separate types and moduleborsh/src/schema/container_ext/validate.rs
[x]
validate
method ofBorshSchemaContainer
split
into
and