1pub(crate) trait BoxedIter<'a>: Iterator + 'a { 2 fn boxed(self) -> Box<dyn Iterator<Item = Self::Item> + 'a> 3 where 4 Self: Sized, 5 { 6 Box::new(self) 7 } 8} 9 10impl<'a, T: Iterator + 'a> BoxedIter<'a> for T {}