Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn wot(x: impl Iterator<Item = u32> + Send) -> Box<Iterator<Item = u32> + Send> {
- Box::new(x)
- }
- fn main(){
- let mut it = vec![0, 1, 2].into_iter();
- wot(it.by_ref()).next();
- println!("{:?}", it.collect::<Vec<_>>());
- }
Add Comment
Please, Sign In to add comment