diff options
author | metamuffin <metamuffin@disroot.org> | 2022-11-28 17:30:59 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-11-28 17:30:59 +0100 |
commit | fdc78eca1a02c451a69da0573f15027a302ec54f (patch) | |
tree | 501c85ec075c89452c7a14383f054a118d4aed80 /karlc/src/main.rs | |
parent | ac66248bb20d45a66cc0c3b3805498e9d6ba9bb8 (diff) | |
download | karlender-fdc78eca1a02c451a69da0573f15027a302ec54f.tar karlender-fdc78eca1a02c451a69da0573f15027a302ec54f.tar.bz2 karlender-fdc78eca1a02c451a69da0573f15027a302ec54f.tar.zst |
upgrade deps
Diffstat (limited to 'karlc/src/main.rs')
-rw-r--r-- | karlc/src/main.rs | 14 |
1 files changed, 7 insertions, 7 deletions
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<PathBuf>, #[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()), ); |