jklamer commented on code in PR #1651:
URL: https://github.com/apache/avro/pull/1651#discussion_r857013392


##########
lang/rust/avro_derive/src/lib.rs:
##########
@@ -117,16 +119,24 @@ fn get_data_struct_schema_def(
         syn::Fields::Named(ref a) => {
             for (position, field) in a.named.iter().enumerate() {
                 let name = field.ident.as_ref().unwrap().to_string(); // we 
know everything has a name
-                let field_documented =
+                let field_attrs =
                     
FieldOptions::from_attributes(&field.attrs[..]).map_err(darling_to_syn)?;
-                let doc = preserve_optional(field_documented.doc);
+                let doc = preserve_optional(field_attrs.doc);
+                let default_value = match field_attrs.default {
+                    Some(default_value) => {
+                        quote! {

Review Comment:
   oooo yeah I wasn't thinking anything so sophisticated as using the 
json::value in the quotes. Just using a dummy command and translating the 
error: https://github.com/apache/avro/pull/1668



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