-
Notifications
You must be signed in to change notification settings - Fork 144
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
Add support for Option<T> attributes #306
Conversation
FYI the examples CI looks broken. |
Thanks @zopieux! I'm busy right now but I'll have a look over the weekend.
Yep that's rust-lang/rust#89935 🙂 |
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.
Thanks @zopieux!
I have a few suggestions which should make the code simpler.
Happy to merge once those are resolved.
e17ea0f
to
b874647
Compare
Introduces the `attr=[value]` syntax that assumes `value` is an `Option<T>`. Renders `attr="value"` for `Some(value)` and entirely omits the attribute for `None`. Implements and therefore closes lambda-fairy#283.
57b4a48
to
3c9eb6c
Compare
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.
Thanks @zopieux!
I added a couple minor changes that you can look through if you like.
Introduces the
attr=[value]
syntax that assumesvalue
is anOption<T>
. Rendersattr="value"
forSome(value)
and entirely omits the attribute forNone
.Implements and therefore closes #283.