splix commented on code in PR #530:
URL: https://github.com/apache/avro-rs/pull/530#discussion_r3063486902
##########
avro/src/reader/block.rs:
##########
@@ -156,6 +211,11 @@ impl<'r, R: Read> Block<'r, R> {
return Err(Details::GetBlockMarker.into());
}
+ self.current_block_info = Some(BlockPosition {
+ offset: block_start,
+ message_count: block_len as usize,
Review Comment:
I'm not arguing, any of this would work and I can change, that's no problem.
But I'm curios to understand why you think this would be better?
My idea is just using the source of truth variable, so there is no way it
gets a wrong number. Using the self.message_count works with the current code,
but it doesn't give any guarantee if it changes. So I'm wondering why the
second approach is better?
--
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]