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

Implement default for Callback<T> #1043

Merged
merged 1 commit into from
Mar 29, 2020

Conversation

TheNeikos
Copy link
Contributor

This would make it easier for users to implement their Properties by using #[derive(Default)] or #[prop_or_default].

Related to #1041

@TheNeikos TheNeikos force-pushed the feature/default_callback branch from b5e5afb to b16b540 Compare March 18, 2020 10:13
src/callback.rs Outdated Show resolved Hide resolved
@jstarry
Copy link
Member

jstarry commented Mar 20, 2020

Nice, we held off on implementing Default for Callback because the old way of defining optional properties was error prone. I think it makes sense to add this now, thanks!

@TheNeikos TheNeikos force-pushed the feature/default_callback branch from b16b540 to f3d6a43 Compare March 28, 2020 21:04
@jstarry jstarry merged commit 91fb5f5 into yewstack:master Mar 29, 2020
@jstarry
Copy link
Member

jstarry commented Mar 29, 2020

Thanks!

@TheNeikos TheNeikos deleted the feature/default_callback branch March 29, 2020 05:51
@jstarry
Copy link
Member

jstarry commented Apr 4, 2020

🎉 released in v0.14.3

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.

2 participants