Kriskras99 commented on code in PR #512:
URL: https://github.com/apache/avro-rs/pull/512#discussion_r2972095813


##########
avro_derive/src/attributes/mod.rs:
##########
@@ -340,6 +340,12 @@ impl FieldOptions {
             return Err(errors);
         }
 
+        // TODO: Implement a better way to do this (maybe if user specifies 
`#[avro(with)]` also use that for the default)
+        // Disable getting the field default, if the schema is not retrieved 
from the field type
+        if with != With::Trait && avro.default == FieldDefault::Trait {
+            avro.default = FieldDefault::Disabled;

Review Comment:
   Yes, I also have a better check in the next PR (with the support for 
deriving schemas for all enums)



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