The iterators returned by iter() and values() cannot be cloned if the keys and values are not Clone themselves.
I think this should not be necessary: for instance, std::slice::Iter is Clone regardless of the element type.
To fix this, Iter, Keys, Values should implement Clone manually (#[derive(Clone)] adds extra Clone bounds on the type parameters: see https://github.com/rust-lang/rust/issues/26925)
The iterators returned by
iter()
andvalues()
cannot be cloned if the keys and values are notClone
themselves. I think this should not be necessary: for instance, std::slice::Iter isClone
regardless of the element type. To fix this,Iter
,Keys
,Values
should implement Clone manually (#[derive(Clone)]
adds extraClone
bounds on the type parameters: see https://github.com/rust-lang/rust/issues/26925)