ultrabug commented on pull request #1379:
URL: https://github.com/apache/avro/pull/1379#issuecomment-951287832


   > This is expected. You try to unwrap a None the second time.
   
   I'm sorry but I'm not sure I'm following you here. Calling the same function 
twice with the same parameters is an expected failure?
   
   My understanding is that Rust's Array &[u8] does implement the `Read` trait 
but there's no mean to `seek` its position back to 0, which means that the 
second time we use it, we are indeed at the end position of the array reader.
   
   For instance, using a `Cursor` + forcing its position with `set_position(0)` 
between the two `from_avro_datum` makes the test above work just fine.


-- 
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]


Reply via email to