Skip to content

consider making Signal: Clone #11

@databasedav

Description

@databasedav

it's annoying to have to specify + Clone in function signatures where a generic signal needs to be cloned, while this has the benefit of being rustic in its minimalism and having to specify the intention to clone up front, it both has ergonomic benefits and all concrete Signal types are already Clone

in the meantime, one can specify a custom trait e.g.

pub trait SignalClone2: Signal + Clone {}

fn f(s: impl SignalClone2<Item = i32>) {
    s.clone();
    ...
}

this should be called SignalClone but that's currently occupied by a dyn compatible version https://docs.rs/jonmo/latest/jonmo/signal/trait.SignalClone.html offered by the library, which i will rename to SignalDynClone soon

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