Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let names: Vec<Vec<String>> = vec![
- vec!["Foo1".to_string(), "Foo2".to_string()],
- vec!["Bar1".to_string(), "Bar2".to_string()],
- ];
- let ids: Vec<i64> = vec![10, 20];
- let x = names.iter().enumerate().flat_map(|(i, v)| {
- v.iter().map(|n| (n.clone(), ids[0]))
- });
- }
Add Comment
Please, Sign In to add comment