davidpeklak commented on code in PR #1914:
URL: https://github.com/apache/avro/pull/1914#discussion_r997769175
##########
lang/rust/avro/src/reader.rs:
##########
@@ -396,9 +396,9 @@ impl GenericSingleObjectReader {
pub fn read_value<R: Read>(&self, reader: &mut R) -> AvroResult<Value> {
let mut header: [u8; 10] = [0; 10];
- match reader.read(&mut header) {
- Ok(size) => {
- if size == 10 && self.expected_header == header {
+ match reader.read_exact(&mut header) {
+ Ok(_) => {
Review Comment:
`reader.read_exact` returns `Result<()>`, so it is not possible to match to
10 here.
--
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]