-
Notifications
You must be signed in to change notification settings - Fork 4
skip(Clone) #105
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
base: main
Are you sure you want to change the base?
skip(Clone) #105
Conversation
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.
Just hypothetically, what will we do when we get to a breaking change? Will we ever want derive_where(skip)
to make Clone
just call default()
instead?
I'm thinking that letting Clone
call default()
under the term skip
is not ideal and would clash with the general usage of derive_where(skip)
. I propose instead a new attribute: derive_where(clone_default)
or derive_where(clone(default))
. WDYT?
Will make a review of the code properly after figuring this out, because it would change the code entirely probably.
I think I'm getting to a point there I'm questioning the global skip as a feature. I think it makes sense to have skips for EqHash etc. but just skipping for all traits that currently support the feature seems strange to me now |
Didn't cross my mind at all, but seems quite reasonable to me. In hindsight, a global skip almost looks like a footgun. But unrelated, right? Or did you mean to keep |
I feel like skip(Clone) is in line with other things that don't explicitly specify that |
Hm, I will go ahead and review nevertheless, not a big issue really. |
I see your point, but thought of skip more as not doing the specific thing in this case cloning, but still doing what is required to allow the skipping, in this case defaulting. |
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.
Looks great!
Just needs an update of the README.
Co-authored-by: daxpedda <daxpedda@gmail.com>
fixes #104