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

Add support for the unit struct in Properties derive #1752

Merged
merged 3 commits into from
Feb 20, 2021

Conversation

Xavientois
Copy link
Contributor

@Xavientois Xavientois commented Feb 20, 2021

Description

Added support for unit structs for deriving the Properties trait. Now, the following works:

#[derive(Properties, Clone, Default)]
struct MyUnitStruct;

Fixes #1677

Checklist

  • I have run cargo make pr-flow
  • I have reviewed my own code
  • I have added tests

IssueHunt Summary

Referenced issues

This pull request has been submitted to:


@Xavientois
Copy link
Contributor Author

Xavientois commented Feb 20, 2021

When I ran cargo make pr-flow locally, the tests failed for html_macro. They also appear to be failing here. Is there anything I should do about this or should I just let it be, as it is unrelated to my PR?

@teymour-aldridge is this test being handled by #1748 ?

@teymour-aldridge
Copy link
Contributor

I think this is an issue from the tests not being updated in an earlier PR (but I haven't traced down to see which one). The actual output looks to be correct (minus line numbers) so if you run with the environment variable TRYBUILD=overwrite set and then push the changes that should get the unit tests working.

Once this merges, I'll rebase my PR (I'm still trying to collect a little feedback on that one).

@siku2 siku2 merged commit f27e268 into yewstack:master Feb 20, 2021
@siku2
Copy link
Member

siku2 commented Feb 20, 2021

Went ahead and merged this so we can tackle the broken tests in #1748.
Thanks, @Xavientois!

@voidpumpkin voidpumpkin added A-yew-macro Area: The yew-macro crate A-yew-router Area: The yew-router crate labels Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew-macro Area: The yew-macro crate A-yew-router Area: The yew-router crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Properties derive macro fails on empty struct
4 participants