You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a struct that needs to be Clone. It contains a member foo with type Option where Foo isn't Clone. On clone I'd like foo to be None (aka Option::default()).
Having used derivative on Debug in the past to do similar things, and having used default in serde, I expected that derivative would let me do this easily.
problem:
I have a struct that needs to be Clone. It contains a member foo with type Option where Foo isn't Clone. On clone I'd like foo to be None (aka Option::default()).
Having used derivative on Debug in the past to do similar things, and having used default in serde, I expected that derivative would let me do this easily.
feature request:
add a field attribute "default" for Clone, with the same behavior as serde's default: https://serde.rs/attr-default.html
The text was updated successfully, but these errors were encountered: