Small fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
extern crate intel_mkl_src;
|
||||
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::HashSet;
|
||||
use std::fs;
|
||||
use std::io::{self, BufRead};
|
||||
@@ -43,12 +44,14 @@ fn nba_history() {
|
||||
let score_1: u16 = data[3].parse().unwrap();
|
||||
let score_2: u16 = data[4].parse().unwrap();
|
||||
|
||||
if score_1 > score_2 {
|
||||
observations.push((data[1].to_string(), data[2].to_string(), t));
|
||||
} else if score_1 < score_2 {
|
||||
observations.push((data[2].to_string(), data[1].to_string(), t));
|
||||
} else {
|
||||
panic!("there shouldn't be any tie games");
|
||||
match score_1.cmp(&score_2) {
|
||||
Ordering::Greater => {
|
||||
observations.push((data[1].to_string(), data[2].to_string(), t));
|
||||
}
|
||||
Ordering::Less => {
|
||||
observations.push((data[2].to_string(), data[1].to_string(), t));
|
||||
}
|
||||
_ => panic!("there shouldn't be any tie games"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user