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 method implicit_clone() to help ensure the type is ImplicitClone #44

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

cecton
Copy link
Member

@cecton cecton commented Nov 9, 2023

Following the advice of @kirillsemyonkin, I'm adding a function
implicit_clone() which will enforce that the type is implementing
ImplicitClone while still actually cloning.

Related to yewstack/yew-autoprops#10 (comment)

@cecton
Copy link
Member Author

cecton commented Nov 9, 2023

screenshot3

@kirillsemyonkin
Copy link
Collaborator

i meant a non-impl fn outside of anything (fn implicit_clone<T: ImplicitClone> instead of fn implicit_clone(&self)), but if this works for your usecase i guess it might work

@cecton
Copy link
Member Author

cecton commented Nov 9, 2023

@kirillsemyonkin yes I know what you meant but I thought this would be better. What do you think?

@cecton cecton merged commit 90c56f8 into yewstack:main Nov 9, 2023
12 checks passed
@cecton cecton deleted the function-implicit-clone branch November 9, 2023 13:37
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