diff --git a/src/app/config.rs b/src/app/config.rs index 05ae3aa..d160022 100644 --- a/src/app/config.rs +++ b/src/app/config.rs @@ -5,8 +5,8 @@ use std::u64; use crate::app::ui::Units; fn parse_duration(raw: &str) -> Result { - match u64::from_str(raw) { - Ok(seconds) if seconds > 0 => Ok(Duration::from_secs(seconds)), + match raw.parse::() { + Ok(seconds) if seconds > 0.0 => Ok(Duration::from_secs_f64(seconds)), _ => Err(format!("{} isn't a positive number", raw)), } }