From 5c910bc6cf193725575ef6146dcc8620e7a4a800 Mon Sep 17 00:00:00 2001 From: Akshay Date: Wed, 22 Jul 2020 22:08:50 +0530 Subject: remove debug key binds, add :write command --- src/app/impl_view.rs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/app/impl_view.rs') 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 { self.set_focus(Absolute::Down); return EventResult::Consumed(None); } - Event::Char('w') => { - // helper bind to test write to file - let j = serde_json::to_string_pretty(&self.habits).unwrap(); - let mut file = File::create("foo.txt").unwrap(); - file.write_all(j.as_bytes()).unwrap(); - return EventResult::Consumed(None); - } - Event::Char('q') => { - self.save_state(); - return EventResult::with_cb(|s| s.quit()); - } Event::Char('v') => { if self.habits.is_empty() { return EventResult::Consumed(None); -- cgit v1.2.3