aboutsummaryrefslogtreecommitdiff
path: root/src/views.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/views.rs')
-rw-r--r--src/views.rs13
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};
7use chrono::prelude::*; 7use chrono::prelude::*;
8use chrono::{Local, NaiveDate}; 8use chrono::{Local, NaiveDate};
9 9
10use crate::habit::{Bit, Count, Habit, TrackEvent, ViewMode}; 10use crate::habit::{Bit, Count, Float, Habit, TrackEvent, ViewMode};
11use crate::theme::cursor_bg; 11use crate::theme::cursor_bg;
12use crate::utils::VIEW_WIDTH; 12use crate::utils::VIEW_WIDTH;
13 13
@@ -193,5 +193,12 @@ macro_rules! auto_view_impl {
193 }; 193 };
194} 194}
195 195
196auto_view_impl!(Count); 196macro_rules! generate_view_impls {
197auto_view_impl!(Bit); 197 ($($x:ident),*) => (
198 $(
199 auto_view_impl!($x);
200 )*
201 );
202}
203
204generate_view_impls!(Count, Bit, Float);