diff options
Diffstat (limited to 'src/views.rs')
-rw-r--r-- | src/views.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/views.rs b/src/views.rs index b90ce2b..ca4f757 100644 --- a/src/views.rs +++ b/src/views.rs | |||
@@ -7,7 +7,7 @@ use cursive::{Printer, Vec2}; | |||
7 | use chrono::prelude::*; | 7 | use chrono::prelude::*; |
8 | use chrono::{Local, NaiveDate}; | 8 | use chrono::{Local, NaiveDate}; |
9 | 9 | ||
10 | use crate::habit::{Bit, Count, Habit, TrackEvent, ViewMode}; | 10 | use crate::habit::{Bit, Count, Float, Habit, TrackEvent, ViewMode}; |
11 | use crate::theme::cursor_bg; | 11 | use crate::theme::cursor_bg; |
12 | use crate::utils::VIEW_WIDTH; | 12 | use crate::utils::VIEW_WIDTH; |
13 | 13 | ||
@@ -193,5 +193,12 @@ macro_rules! auto_view_impl { | |||
193 | }; | 193 | }; |
194 | } | 194 | } |
195 | 195 | ||
196 | auto_view_impl!(Count); | 196 | macro_rules! generate_view_impls { |
197 | auto_view_impl!(Bit); | 197 | ($($x:ident),*) => ( |
198 | $( | ||
199 | auto_view_impl!($x); | ||
200 | )* | ||
201 | ); | ||
202 | } | ||
203 | |||
204 | generate_view_impls!(Count, Bit, Float); | ||