Function itertools::cloned
[−]
[src]
ⓘImportant traits for Cloned<I>
pub fn cloned<'a, I, T: 'a>(iterable: I) -> Cloned<I::IntoIter> where
I: IntoIterator<Item = &'a T>,
T: Clone,
Create an iterator that clones each element from &T to T
IntoIterator
enabled version of i.cloned()
.
use itertools::cloned; assert_eq!(cloned(b"abc").next(), Some(b'a'));