type annotated instead of turbofish
This commit is contained in:
parent
ee442f9309
commit
1c5baebd27
@ -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::<Vec<&str>>();
|
||||
.collect();
|
||||
|
||||
let mut selected_colors = HashSet::new();
|
||||
let mut rng = rand::thread_rng();
|
||||
|
Loading…
Reference in New Issue
Block a user