-
Notifications
You must be signed in to change notification settings - Fork 4
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
Recursive patch merging #42
Comments
#43 modify the Can you please modify the example for me? The example is also the spec when we need to implement something, the way is like TDD, we can make sure what we will do always fits the user's need. The example is not in vain. |
Thanks for the clear example about the bug. ❤️ I have another solution for this.
What do you think about it? |
If you want to solve this, we can keep it. The implementation is up to you. For me, 3 is good. 😄 |
fixed by #45 |
When using the
<<
operator between two patches, it merges them together.For now if both patches have the same field defined, we use the right end value.
It would be better IMO to merge both values if they are patches.
This lead to a problem:
Option
.Merging
Option
patches is not implemented by default and can't be implemented.I see 2 solutions to fix that:
Patch<Option<P>> for Option<T> where T: Patch<P>
to use a custom struct:OptionPatch
. The best choice IMO since we can implement easily other traits on this new struct.Shl<Option<$patch>> for Option<$patch>
which could lead to many unuseful implementations@yanganto What do you think ?
The text was updated successfully, but these errors were encountered: