Closed davidsemakula closed 8 months ago
I'm working on implementing support for #[darling(word)]
syntax
LMK if I should squash the commits 🙂
LMK if I should squash the commits 🙂
I think we're very close to the squash point.
I'll work on the changelog and readme updates tomorrow.
- 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.
Agreed, default
would be confusing and word
is a bit cryptic, but I don't have a better suggestion at this point. May be the more verbose from_word
?
I updated the changelog. But I don't think I can update the readme to introduce and describe #[darling(word)]
succinctly, can you take that part? I'm guessing it should be a bullet point under Features?
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 👍
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?
Added an example.
Pinging @TedDriggs
@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 🙂
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)
@TedDriggshttps://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 GitHubhttps://github.com/TedDriggs/darling/pull/260#issuecomment-1910825716, or unsubscribehttps://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.