rust-iterator-emoji
rust-iterator-emoji copied to clipboard
Fix "unzip" example
playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=eabdf778bf3063e24bb66104786a84d2
I don't know if there is a way to avoid .cloned(), but without it, it doesn't seem to compile.
For the record, a way to avoid .cloned() is to use std::array::IntoIter::new(), which is available in the beta version of Rust, see https://blog.rust-lang.org/2021/02/26/const-generics-mvp-beta.html#by-value-array-iterator.
playground: https://play.rust-lang.org/?version=beta&mode=debug&edition=2018&gist=da37c295f3b86bffe27b0b7f3afad156