From cf75410860384fa00d7b345cae0c9b9588b62093 Mon Sep 17 00:00:00 2001 From: Ian Mason Date: Mon, 29 Aug 2022 23:30:29 -0700 Subject: [PATCH] Clippy fixes --- src/among_us_version.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/among_us_version.rs b/src/among_us_version.rs index c395e4a..0383474 100644 --- a/src/among_us_version.rs +++ b/src/among_us_version.rs @@ -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(), } } }