diff options
Diffstat (limited to 'karlc/src/main.rs')
-rw-r--r-- | karlc/src/main.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/karlc/src/main.rs b/karlc/src/main.rs index 55bb974..501ef3c 100644 --- a/karlc/src/main.rs +++ b/karlc/src/main.rs @@ -1,17 +1,14 @@ pub mod client; pub mod pretty; +use crate::pretty::fmt_condition; use chrono::{NaiveDateTime, Utc}; use clap::{Args, Parser, Subcommand}; use client::Client; -use karlcommon::{ - socket_path, version, ClientboundPacket, Condition, Schedule, ServerboundPacket, Task, -}; +use karlcommon::{socket_path, version, ClientboundPacket, Schedule, ServerboundPacket, Task}; use log::{error, info}; use std::{os::unix::net::UnixStream, path::PathBuf, process::exit}; -use crate::pretty::fmt_condition; - /// CLI interface for karld #[derive(Parser)] #[clap(about, author, version)] @@ -96,7 +93,7 @@ fn main() { if !t.tags.is_empty() { println!(" \x1b[38;2;100;255;100mTags:\x1b[0m {}", t.tags.join(", ")); } - print!(" \x1b[38;2;100;255;100mSchedule: \x1b[0m",); + print!(" \x1b[38;2;100;255;100mSchedule: \x1b[0m"); match t.schedule { Schedule::Never => println!("\x1b[3m\x1b[2m(never)\x1b[0m"), Schedule::Dynamic { .. } => todo!(), @@ -122,13 +119,13 @@ fn main() { for i in instances { println!( "\x1b[19G{} - {}", - i.at.start + i.start .map(|e| format!( "{}", NaiveDateTime::from_timestamp(e, 0) )) .unwrap_or("...".to_string()), - i.at.end + i.end .map(|e| format!( "{}", NaiveDateTime::from_timestamp(e, 0) |