From 1c5baebd27f80adbe0a84560a90dcccbafe3ae68 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Fri, 2 Aug 2024 15:44:02 -0400 Subject: [PATCH] type annotated instead of turbofish --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();