Kriskras99 commented on code in PR #339:
URL: https://github.com/apache/avro-rs/pull/339#discussion_r2555558846
##########
avro/src/decode.rs:
##########
@@ -101,39 +102,66 @@ pub(crate) fn decode_internal<R: Read, S: Borrow<Schema>>(
}
}
}
- Schema::Decimal(DecimalSchema { ref inner, .. }) => match &**inner {
- Schema::Fixed { .. } => {
- match decode_internal(inner, names, enclosing_namespace,
reader)? {
+ Schema::Decimal(DecimalSchema { inner, .. }) => match inner {
+ InnerDecimalSchema::Fixed(fixed) => {
+ match decode_internal(
+ &Schema::Fixed(fixed.copy_only_size()),
Review Comment:
We could clone the entire `FixedSchema` but for decoding only the size is
relevant. (If you clone, you also clone `name`,`aliases`,`doc`,`default`, and
`attributes`)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]