Last active
June 28, 2020 16:36
-
-
Save rochacbruno/262828f17430cda4e06bc978393868c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let vec_opt = [Some(1), Some(2), Some(3)].iter().copied().collect::<Vec<Option<i32>>>(); | |
let opt_vec = [Some(1), Some(2), Some(3)].iter().copied().collect::<Option<Vec<i32>>>(); | |
println!("{:?}", vec_opt); | |
println!("{:?}", opt_vec); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is Python language?