Skip to content

Impls and derive for Merge trait #24

@xmakro

Description

@xmakro

It would be useful if Merge was implemented for common containers such as HashMap and if it could be derived for structs.

#[derive(Default, Merge)
struct A {
  hello: Mean,
  world: HashMap<String, Max>,
}

let mut x = A::default();
let y = A::default();
x.merge(y);

I'm happy to send a PR if you agree with this. It might require a new crate average_derive for the derive macros.

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