diff options
author | Akshay <[email protected]> | 2020-07-22 17:38:50 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-07-22 17:38:50 +0100 |
commit | 5c910bc6cf193725575ef6146dcc8620e7a4a800 (patch) | |
tree | 600bfddbc38325b8920feea0b080f7456b5d0bd6 /src/app/impl_view.rs | |
parent | c421750d739f008902822a0254ccdff93556dca6 (diff) |
remove debug key binds, add :write command
Diffstat (limited to 'src/app/impl_view.rs')
-rw-r--r-- | src/app/impl_view.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/app/impl_view.rs b/src/app/impl_view.rs index b8c4589..0dfd20b 100644 --- a/src/app/impl_view.rs +++ b/src/app/impl_view.rs | |||
@@ -102,17 +102,6 @@ impl View for App { | |||
102 | self.set_focus(Absolute::Down); | 102 | self.set_focus(Absolute::Down); |
103 | return EventResult::Consumed(None); | 103 | return EventResult::Consumed(None); |
104 | } | 104 | } |
105 | Event::Char('w') => { | ||
106 | // helper bind to test write to file | ||
107 | let j = serde_json::to_string_pretty(&self.habits).unwrap(); | ||
108 | let mut file = File::create("foo.txt").unwrap(); | ||
109 | file.write_all(j.as_bytes()).unwrap(); | ||
110 | return EventResult::Consumed(None); | ||
111 | } | ||
112 | Event::Char('q') => { | ||
113 | self.save_state(); | ||
114 | return EventResult::with_cb(|s| s.quit()); | ||
115 | } | ||
116 | Event::Char('v') => { | 105 | Event::Char('v') => { |
117 | if self.habits.is_empty() { | 106 | if self.habits.is_empty() { |
118 | return EventResult::Consumed(None); | 107 | return EventResult::Consumed(None); |