Guest User

Untitled

a guest
May 22nd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. fn wot(x: impl Iterator<Item = u32> + Send) -> Box<Iterator<Item = u32> + Send> {
  2. Box::new(x)
  3. }
  4. fn main(){
  5. let mut it = vec![0, 1, 2].into_iter();
  6. wot(it.by_ref()).next();
  7. println!("{:?}", it.collect::<Vec<_>>());
  8. }
Add Comment
Please, Sign In to add comment