diff options
Diffstat (limited to 'src/habit.rs')
-rw-r--r-- | src/habit.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/habit.rs b/src/habit.rs index 92e0b9f..5469aab 100644 --- a/src/habit.rs +++ b/src/habit.rs | |||
@@ -15,7 +15,7 @@ pub enum TrackEvent { | |||
15 | Decrement, | 15 | Decrement, |
16 | } | 16 | } |
17 | 17 | ||
18 | #[derive(Debug, PartialEq, Serialize, Deserialize)] | 18 | #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] |
19 | pub enum ViewMode { | 19 | pub enum ViewMode { |
20 | Day, | 20 | Day, |
21 | Month, | 21 | Month, |
@@ -115,17 +115,17 @@ macro_rules! auto_habit_impl { | |||
115 | fn take_focus(&mut self, d: Direction) -> bool { | 115 | fn take_focus(&mut self, d: Direction) -> bool { |
116 | ShadowView::take_focus(self, d) | 116 | ShadowView::take_focus(self, d) |
117 | } | 117 | } |
118 | fn set_view_month_offset(&mut self, offset: u32) { | ||
119 | Habit::set_view_month_offset(self, offset) | ||
120 | } | ||
121 | fn get_name(&self) -> String { | 118 | fn get_name(&self) -> String { |
122 | Habit::name(self) | 119 | Habit::name(self) |
123 | } | 120 | } |
121 | fn set_view_month_offset(&mut self, offset: u32) { | ||
122 | Habit::set_view_month_offset(self, offset) | ||
123 | } | ||
124 | fn view_month_offset(&self) -> u32 { | 124 | fn view_month_offset(&self) -> u32 { |
125 | Habit::view_month_offset(self) | 125 | Habit::view_month_offset(self) |
126 | } | 126 | } |
127 | fn set_view_mode(&mut self, mode: ViewMode) { | 127 | fn set_view_mode(&mut self, mode: ViewMode) { |
128 | Habit::set_view_mode(&mut self, mode: ViewMode) | 128 | Habit::set_view_mode(self, mode) |
129 | } | 129 | } |
130 | fn view_mode(&self) -> ViewMode { | 130 | fn view_mode(&self) -> ViewMode { |
131 | Habit::view_mode(self) | 131 | Habit::view_mode(self) |