diff --git a/src/main.rs b/src/main.rs index aec8c6d..326b359 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,16 +43,6 @@ fn main() -> Result<(), Error> { &config.password, )?; - // let teams = ["mtl", "car", "cbj"]; - // for abbrev in &teams { - // let team = api.get_team_by_abbrev(abbrev); - // println!( - // "{} {:.3}", - // team.abbrev, - // simulation::odds_for_team(&api, team, 50_000) - // ); - // } - for abbrev in config.playoffs { let team = api.get_team_by_abbrev(&abbrev); let analyzer = Analyzer::new(&api, team); diff --git a/src/nhlapi.rs b/src/nhlapi.rs index 4220e25..c3be0cb 100644 --- a/src/nhlapi.rs +++ b/src/nhlapi.rs @@ -371,7 +371,8 @@ pub mod teams { .send()? .json()?; - root.teams.sort_unstable_by_key(|t| t.full_name.clone()); + root.teams + .sort_unstable_by(|left, right| left.full_name.cmp(&right.full_name)); for (sub, team) in SUBREDDITS.lines().zip(root.teams.iter_mut()) { team.subreddit = sub.trim().to_string();