aboutsummaryrefslogtreecommitdiff
path: root/src/habit.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-07-12 05:00:29 +0100
committerAkshay <[email protected]>2020-07-12 05:00:29 +0100
commit0b18c65466a59b1c9f8d1bfbe596fc2750571dfb (patch)
tree7ce5dce6c70c4212153812bab78d2f3c3f462694 /src/habit.rs
parentfbb0c754f4029cc93033ff4aabb28a8ab9c1e7e7 (diff)
fix trait bounds bug, prep for view modes
Diffstat (limited to 'src/habit.rs')
-rw-r--r--src/habit.rs10
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)]
19pub enum ViewMode { 19pub 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)