martin-g commented on code in PR #1914:
URL: https://github.com/apache/avro/pull/1914#discussion_r997490396
##########
lang/rust/avro/src/reader.rs:
##########
@@ -804,6 +804,38 @@ mod tests {
assert_eq!(expected_value, val);
}
+ #[test]
+ fn test_avro_3507_single_object_reader_incomplete_reads() {
Review Comment:
3507 ?!
```suggestion
fn avro_3642_test_single_object_reader_incomplete_reads() {
```
##########
lang/rust/avro/src/reader.rs:
##########
@@ -804,6 +804,38 @@ mod tests {
assert_eq!(expected_value, val);
}
+ #[test]
+ fn test_avro_3507_single_object_reader_incomplete_reads() {
+ let obj = TestSingleObjectReader {
+ a: 42,
+ b: 3.33,
+ c: vec!["cat".into(), "dog".into()],
+ };
+ let mut to_read_1 = Vec::<u8>::new();
+ to_read_1.extend_from_slice(&[0xC3, 0x01]);
Review Comment:
do we need the Vec+extend_from_slice() ? Can't we just do `let to_read_1 =
vec!(0xC3, 0x01);` ?
Also please add a comment that those two bytes are the special magic ones.
--
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]