You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2022/12/18 12:09:38 UTC

[GitHub] [avro] martin-g commented on a diff in pull request #2024: AVRO-3692: [rust] Make serde deserializer support serde flatten

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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org