Kriskras99 opened a new pull request, #255:
URL: https://github.com/apache/avro-rs/pull/255

   In the original implementation we first read the length and then read the 
remainder either as `Fixed` if the length is 16 and `String` if it is not. It 
uses a temporary `Vec` to be able to backtrack if `Fixed` is wrong.
   
   The backtrack can only happen if it fails to read a `Fixed` or if it gets a 
different type than `Fixed` from `decode_internal`. The last case can never 
happen, as `decode_internal` always returns the type corresponding to the 
schema. The first case can only happen if there are not enough bytes, because 
any byte pattern is valid for `Fixed`. If `Fixed` cannot read enough bytes, 
than `String` won't be able to read enough bytes either.
   
   I did not add a fallback from `Uuid::from_slice` to `Uuuid::parse_str` as an 
UUID string is at least 32 characters, so it would fail anyway.


-- 
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: dev-unsubscr...@avro.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to