Clippy fixes

This commit is contained in:
2022-08-29 23:30:29 -07:00
parent 35828e4b5b
commit cf75410860

View File

@@ -1,4 +1,5 @@
use std::fmt;
#[derive(Ord, PartialOrd, Eq, PartialEq)]
pub struct AmongUsVersion {
year: i32,
@@ -20,9 +21,9 @@ impl From<&str> for AmongUsVersion {
let v: Vec<&str> = tmp_str.split('.').collect();
AmongUsVersion {
year: i32::from_str_radix(v[0], 10).unwrap(),
month: i32::from_str_radix(v[1], 10).unwrap(),
day: i32::from_str_radix(v[2], 10).unwrap(),
year: v[0].parse().unwrap(),
month: v[1].parse().unwrap(),
day: v[2].parse().unwrap(),
}
}
}