diff --git a/src/main.rs b/src/main.rs index 791da77..7926fa4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,12 +10,12 @@ fn main() { let teams_json: Value = serde_json::from_reader(reader).expect("Unable to parse JSON"); let team_names_list = teams_json["team_names"].as_array().unwrap(); - let team_colors = teams_json["team_colors"] + let team_colors: Vec<&str> = teams_json["team_colors"] .as_array() .unwrap() .iter() .filter_map(|color| color.as_str()) - .collect::>(); + .collect(); let mut selected_colors = HashSet::new(); let mut rng = rand::thread_rng();