From 27a925262bfd4a70f251226c17b43749b9fd81bb Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 10 Jul 2020 22:36:08 +0530 Subject: add directories crate, simplify done status --- Cargo.toml | 1 + src/views.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 593963b..532842e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ serde_json = "1.0" lazy_static = "1.4.0" erased-serde = "0.3" typetag = "0.1.4" +directories = "3.0.1" [dependencies.cursive] version = "0.14" diff --git a/src/views.rs b/src/views.rs index 64c85ce..d25e59b 100644 --- a/src/views.rs +++ b/src/views.rs @@ -39,7 +39,7 @@ where let todo_style = Style::from(CONFIGURATION.todo_color); let future_style = Style::from(CONFIGURATION.future_color); - let done_today_style = Style::from(Effect::Strikethrough); + let strikethrough = Style::from(Effect::Strikethrough); let goal_status = self.view_month_offset() == 0 && self.reached_goal(Local::now().naive_utc().date()); @@ -47,7 +47,7 @@ where printer.with_style( Style::merge(&[ if goal_status { - done_today_style + strikethrough } else { Style::none() }, -- cgit v1.2.3