diff options
author | Akshay <[email protected]> | 2021-05-13 16:20:17 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-05-13 16:20:17 +0100 |
commit | 09ee8cc84251d1758766dedff9e25497eebb88d8 (patch) | |
tree | dc837f785ad64d6c284235aa6c53fa533a3efbf1 /src/app.rs | |
parent | 41c50e4c324b19183d1c36c185878d4fa500662a (diff) |
rework arity errors
Diffstat (limited to 'src/app.rs')
-rw-r--r-- | src/app.rs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -27,6 +27,7 @@ use std::{ | |||
27 | path::{Path, PathBuf}, | 27 | path::{Path, PathBuf}, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | use log::info; | ||
30 | use obi::{CompressionType, Image}; | 31 | use obi::{CompressionType, Image}; |
31 | use sdl2::{ | 32 | use sdl2::{ |
32 | event::Event, | 33 | event::Event, |
@@ -744,6 +745,7 @@ impl<'ctx> AppState<'ctx> { | |||
744 | self.mode = Mode::Command; | 745 | self.mode = Mode::Command; |
745 | } | 746 | } |
746 | } | 747 | } |
748 | info!("key press: {:?}", &event); | ||
747 | match self.mode { | 749 | match self.mode { |
748 | Mode::Draw => { | 750 | Mode::Draw => { |
749 | match event { | 751 | match event { |
@@ -825,6 +827,7 @@ impl<'ctx> AppState<'ctx> { | |||
825 | .. | 827 | .. |
826 | } if self.keybinds.contains_key(&Keybind::new(k, keymod)) => { | 828 | } if self.keybinds.contains_key(&Keybind::new(k, keymod)) => { |
827 | let body = | 829 | let body = |
830 | // clone here because body can modify itself | ||
828 | self.keybinds.get(&Keybind::new(k, keymod)).unwrap().clone(); | 831 | self.keybinds.get(&Keybind::new(k, keymod)).unwrap().clone(); |
829 | self.eval_expr(&body); | 832 | self.eval_expr(&body); |
830 | } | 833 | } |