I have a type alias
type BoxIter<'a, T: Clone> = Box<dyn Iterator<Item = &'a T> + 'a>;
and I've run into a snag where I need Iterator to be cloneable
Trying
type BoxIter<'a, T: Clone> = Box<dyn Iterator<Item = &'a T> + 'a + Clone>;
Gives me an error
and I've also tried
trait CloneableIterator: Iterator + Clone {}
impl<I> CloneableIterator for I where I: Iterator, I: Clone {}
But it complains about CloneableIterator not being sized when I try to create a trait object from it. (I've tried giving it Sized as well)
I found other people having the same issue here https://github.com/rust-lang/rfcs/issues/2035
I was wondering if there's a solution to this