From fdc78eca1a02c451a69da0573f15027a302ec54f Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 28 Nov 2022 17:30:59 +0100 Subject: upgrade deps --- karlc/src/main.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'karlc/src/main.rs') diff --git a/karlc/src/main.rs b/karlc/src/main.rs index 6ea540a..f4a4736 100644 --- a/karlc/src/main.rs +++ b/karlc/src/main.rs @@ -15,7 +15,7 @@ use std::{os::unix::net::UnixStream, path::PathBuf, process::exit}; #[clap(about, author, version)] struct Arguments { /// Custom path to the daemon socket - #[clap(long)] + #[arg(long)] socket_path: Option, #[clap(subcommand)] action: Action, @@ -115,8 +115,8 @@ fn main() { scheduled .map(|r| format!( "{} - {}", - NaiveDateTime::from_timestamp(r.start, 0), - NaiveDateTime::from_timestamp(r.end, 0) + NaiveDateTime::from_timestamp_opt(r.start, 0).unwrap(), + NaiveDateTime::from_timestamp_opt(r.end, 0).unwrap() )) .unwrap_or("...".to_string()) ); @@ -124,8 +124,8 @@ fn main() { Schedule::Static(t) => { println!( "from {} to {}", - NaiveDateTime::from_timestamp(t.start, 0), - NaiveDateTime::from_timestamp(t.end, 0) + NaiveDateTime::from_timestamp_opt(t.start, 0).unwrap(), + NaiveDateTime::from_timestamp_opt(t.end, 0).unwrap() ) } Schedule::Condition(o) => { @@ -146,13 +146,13 @@ fn main() { i.start .map(|e| format!( "{}", - NaiveDateTime::from_timestamp(e, 0) + NaiveDateTime::from_timestamp_opt(e, 0).unwrap() )) .unwrap_or("...".to_string()), i.end .map(|e| format!( "{}", - NaiveDateTime::from_timestamp(e, 0) + NaiveDateTime::from_timestamp_opt(e, 0).unwrap() )) .unwrap_or("...".to_string()), ); -- cgit v1.2.3-70-g09d2