Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use darling's with to handle unnesting attrs #313

Merged
merged 1 commit into from Feb 23, 2024
Merged

Conversation

TedDriggs
Copy link
Collaborator

Before darling 0.20.8, the receiver struct had to take the forwarded attributes without transformation. That led to the options structs having a field called attrs that was drained during FromDeriveInput/FromField execution, and was vestigial on the finished struct.

The new approach instead does that transformation in the attrs field, resulting in an emitted type that is cleaner and more obvious to use.

Before darling 0.20.8, the receiver struct had to take the forwarded attributes without transformation.
That led to the options structs having a field called attrs that was drained during FromDeriveInput/FromField execution, and was vestigial on the finished struct.

The new approach instead does that transformation in the attrs field, resulting in an emitted type that is cleaner and more obvious to use.
@TedDriggs TedDriggs merged commit 10152f1 into master Feb 23, 2024
30 checks passed
@TedDriggs TedDriggs deleted the with-unnested-attrs branch February 23, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant