Skip to content

feature request: default on Clone #108

@bryanlarsen

Description

@bryanlarsen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions