Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn y(_: std::option::Option<&mut dyn std::iter::ExactSizeIterator<Item = u8>>) {
- dbg!("hello");
- }
- fn z(ret: impl std::iter::ExactSizeIterator<Item = u8> ) -> impl std::iter::ExactSizeIterator<Item = u8> {
- ret
- }
- fn main() {
- let x = Some(vec![1u8, 2u8, 3u8]);
- let mut iter_option = x.as_ref().map(|v| (v.iter().cloned()));
- y(iter_option.as_mut().map(|i| i as &mut dyn std::iter::ExactSizeIterator<Item = u8>));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement