Function rhit::cloned [−][src]
pub fn cloned<'a, I, T>(iterable: I) -> Cloned<<I as IntoIterator>::IntoIter>ⓘ where
T: 'a + Clone,
I: IntoIterator<Item = &'a T>,
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'));