fix sort
This commit is contained in:
10
src/main.rs
10
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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user