#[derive(Clone)] infers a _: Clone bound for all parameters on the type, which (generally) is a safe default but is too restrictive for cases like this. That restriction might be lifted at some point (rust-lang/rust#40754) but for now, a manual Clone impl works better.
#[derive(Clone)]
infers a_: Clone
bound for all parameters on the type, which (generally) is a safe default but is too restrictive for cases like this. That restriction might be lifted at some point (rust-lang/rust#40754) but for now, a manualClone
impl works better.