martin-g commented on code in PR #205:
URL: https://github.com/apache/avro-rs/pull/205#discussion_r2132015829


##########
avro_derive/src/lib.rs:
##########
@@ -215,11 +222,18 @@ fn get_data_enum_schema_def(
     if e.variants.iter().all(|v| syn::Fields::Unit == v.fields) {
         let default_value = default_enum_variant(e, error_span)?;
         let default = preserve_optional(default_value);
-        let symbols: Vec<String> = e
-            .variants
-            .iter()
-            .map(|variant| variant.ident.to_string())
-            .collect();
+        let mut symbols = Vec::new();
+        for variant in &e.variants {
+            let field_attrs = 
VariantOptions::from_attributes(&variant.attrs[..])
+                .map_err(darling_to_syn)
+                .unwrap();

Review Comment:
   Can we use `?` instead ?



-- 
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]

Reply via email to