logo
pub fn cloned<'a, I, T>(iterable: I) -> Cloned<<I as IntoIterator>::IntoIter>Notable traits for Cloned<I>impl<'a, I, T> Iterator for Cloned<I> where
    T: 'a + Clone,
    I: Iterator<Item = &'a T>, 
type Item = T;
where
    T: 'a + Clone,
    I: IntoIterator<Item = &'a T>, 
Expand description

Create an iterator that clones each element from &T to T

IntoIterator enabled version of Iterator::cloned.

use itertools::cloned;

assert_eq!(cloned(b"abc").next(), Some(b'a'));