summaryrefslogtreecommitdiffstats
path: root/src/habit/count.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/habit/count.rs')
-rw-r--r--src/habit/count.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/habit/count.rs b/src/habit/count.rs
index 09fd399..75b51cc 100644
--- a/src/habit/count.rs
+++ b/src/habit/count.rs
@@ -4,6 +4,7 @@ use std::default::Default;
use chrono::NaiveDate;
use serde::{Deserialize, Serialize};
+use crate::command::GoalKind;
use crate::habit::prelude::default_auto;
use crate::habit::traits::Habit;
use crate::habit::{InnerData, TrackEvent};
@@ -42,6 +43,9 @@ impl Habit for Count {
fn set_name(&mut self, n: impl AsRef<str>) {
self.name = n.as_ref().to_owned();
}
+ fn kind(&self) -> GoalKind {
+ GoalKind::Count(self.goal)
+ }
fn set_goal(&mut self, g: Self::HabitType) {
self.goal = g;
}