-
Notifications
You must be signed in to change notification settings - Fork 68
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
Improve FromMeta
implementation for enums
#260
Conversation
053e722
to
233b60c
Compare
I'm working on implementing support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am very excited about where this is heading; thank you for the latest updates. Feedback is now starting to get more specific, so I think we're closing in on readiness to merge.
LMK if I should squash the commits 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only remaining items are:
- Deciding if this is the best name for this attribute. I thought it was originally (and I still don't think
default
is appropriate), but I am now worrying thatword
is too cryptic. - Updating the CHANGELOG
- Updating the README
I think we're very close to the squash point. |
I'll work on the changelog and readme updates tomorrow.
Agreed, |
I updated the changelog. But I don't think I can update the readme to introduce and describe |
In the absence of a README entry, we could consider an example that includes several features of a heterogeneous enum. Maybe replicate one of the tests over to the examples and add some comments to show what's going on? |
Sounds good, I'll work on an example 👍 |
Added an example. |
Pinging @TedDriggs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor changes left, then we're ready to merge!
Apologies for the delayed review, I was traveling last week and getting caught up at work this week.
@TedDriggs can we get this published on crates.io when you have some time? |
Will do on Monday; out of town this weekend
…________________________________
From: David Semakula ***@***.***>
Sent: Thursday, January 25, 2024 11:13:50 AM
To: TedDriggs/darling ***@***.***>
Cc: Ted Driggs ***@***.***>; Mention ***@***.***>
Subject: Re: [TedDriggs/darling] Improve `FromMeta` implementation for enums (PR #260)
@TedDriggs<https://github.com/TedDriggs> can we get this published on crates.io when you have some time?
If I can do anything to help that process along, LMK 🙂
—
Reply to this email directly, view it on GitHub<#260 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABEVHRZWVZUL6IB6CGXY5STYQKVG5AVCNFSM6AAAAABBFFQZJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQHAZDKNZRGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
v0.20.4 is now live. |
Awesome! Thanks for taking the time to review this PR 🙂 |
Improves FromMeta implementation for enums
FromMeta::from_list
to provide a consistent API for heterogenous enums that include a mix of unit, newtype and struct variants (see included test for an example).FromMeta
implementation for enums.