diff options
author | Akshay <[email protected]> | 2020-06-29 10:58:51 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-06-29 10:58:51 +0100 |
commit | 579e68f27c1798c156fed2c7e6ad0edca2a7f72c (patch) | |
tree | d82c5f52ef880a18216f6aac53352c32f41045fb /src | |
parent | ae9927db2acb96a0cb3a3e1f867c11c565d3bc10 (diff) |
more testing stuff
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/src/main.rs b/src/main.rs index 2037a51..3e838e5 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -56,31 +56,33 @@ fn load_configuration_file() -> AppConfig { | |||
56 | fn main() { | 56 | fn main() { |
57 | let mut s = Cursive::default(); | 57 | let mut s = Cursive::default(); |
58 | 58 | ||
59 | let mut gymming = Count::new("gym", 5); | 59 | // let mut gymming = Count::new("gym", 5); |
60 | gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 11), 7); | 60 | // gymming.insert_entry(NaiveDate::from_ymd(2020, 5, 11), 7); |
61 | gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 12), 8); | 61 | // gymming.insert_entry(NaiveDate::from_ymd(2020, 5, 12), 8); |
62 | gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 13), 9); | 62 | // gymming.insert_entry(NaiveDate::from_ymd(2020, 5, 13), 9); |
63 | gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 14), 10); | 63 | // gymming.insert_entry(NaiveDate::from_ymd(2020, 5, 14), 10); |
64 | gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 15), 11); | 64 | // gymming.insert_entry(NaiveDate::from_ymd(2020, 5, 15), 11); |
65 | 65 | ||
66 | let mut reading = Bit::new("read"); | 66 | // let mut reading = Bit::new("read"); |
67 | reading.insert_entry(NaiveDate::from_ymd(2020, 4, 11), true.into()); | 67 | // reading.insert_entry(NaiveDate::from_ymd(2020, 5, 11), true.into()); |
68 | reading.insert_entry(NaiveDate::from_ymd(2020, 4, 12), false.into()); | 68 | // reading.insert_entry(NaiveDate::from_ymd(2020, 5, 12), false.into()); |
69 | reading.insert_entry(NaiveDate::from_ymd(2020, 4, 13), true.into()); | 69 | // reading.insert_entry(NaiveDate::from_ymd(2020, 5, 13), true.into()); |
70 | reading.insert_entry(NaiveDate::from_ymd(2020, 4, 14), false.into()); | 70 | // reading.insert_entry(NaiveDate::from_ymd(2020, 5, 14), false.into()); |
71 | reading.insert_entry(NaiveDate::from_ymd(2020, 4, 15), true.into()); | 71 | // reading.insert_entry(NaiveDate::from_ymd(2020, 5, 15), true.into()); |
72 | 72 | ||
73 | let mut walking = Bit::new("walk"); | 73 | // let mut walking = Bit::new("walk"); |
74 | walking.insert_entry(NaiveDate::from_ymd(2020, 4, 11), true.into()); | 74 | // walking.insert_entry(NaiveDate::from_ymd(2020, 5, 11), true.into()); |
75 | walking.insert_entry(NaiveDate::from_ymd(2020, 4, 12), false.into()); | 75 | // walking.insert_entry(NaiveDate::from_ymd(2020, 5, 12), false.into()); |
76 | walking.insert_entry(NaiveDate::from_ymd(2020, 4, 13), true.into()); | 76 | // walking.insert_entry(NaiveDate::from_ymd(2020, 5, 13), true.into()); |
77 | walking.insert_entry(NaiveDate::from_ymd(2020, 4, 14), false.into()); | 77 | // walking.insert_entry(NaiveDate::from_ymd(2020, 5, 14), false.into()); |
78 | walking.insert_entry(NaiveDate::from_ymd(2020, 4, 15), true.into()); | 78 | // walking.insert_entry(NaiveDate::from_ymd(2020, 5, 15), true.into()); |
79 | 79 | ||
80 | let mut app = App::new(); | 80 | // let mut app = App::new(); |
81 | app.add_habit(Box::new(gymming)); | 81 | // app.add_habit(Box::new(gymming)); |
82 | app.add_habit(Box::new(reading)); | 82 | // app.add_habit(Box::new(reading)); |
83 | app.add_habit(Box::new(walking)); | 83 | // app.add_habit(Box::new(walking)); |
84 | |||
85 | let app = App::load_state(); | ||
84 | s.add_layer(app); | 86 | s.add_layer(app); |
85 | 87 | ||
86 | s.set_theme(theme::theme_gen()); | 88 | s.set_theme(theme::theme_gen()); |