martin-g commented on code in PR #2024:
URL: https://github.com/apache/avro/pull/2024#discussion_r1051588329
##########
lang/rust/avro/src/de.rs:
##########
@@ -435,6 +433,7 @@ impl<'a, 'de> de::Deserializer<'de> for &'a
Deserializer<'de> {
{
match *self.input {
Value::Map(ref items) =>
visitor.visit_map(MapDeserializer::new(items)),
+ Value::Record(ref fields) =>
visitor.visit_map(RecordDeserializer::new(fields)),
_ => Err(de::Error::custom("not a map")),
Review Comment:
```suggestion
_ => Err(de::Error::custom(format!("Expected a Record or a Map!
Got: {:?}", &self.input))),
```
##########
lang/rust/avro/src/de.rs:
##########
@@ -857,6 +856,33 @@ mod tests {
);
}
+ #[test]
+ fn test_from_value_struct_flatten() {
Review Comment:
```suggestion
fn test_avro_3692_from_value_struct_flatten() {
```
--
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]