From 09ee8cc84251d1758766dedff9e25497eebb88d8 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 13 May 2021 20:50:17 +0530 Subject: rework arity errors --- src/app.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/app.rs') diff --git a/src/app.rs b/src/app.rs index 61b2657..04468a6 100644 --- a/src/app.rs +++ b/src/app.rs @@ -27,6 +27,7 @@ use std::{ path::{Path, PathBuf}, }; +use log::info; use obi::{CompressionType, Image}; use sdl2::{ event::Event, @@ -744,6 +745,7 @@ impl<'ctx> AppState<'ctx> { self.mode = Mode::Command; } } + info!("key press: {:?}", &event); match self.mode { Mode::Draw => { match event { @@ -825,6 +827,7 @@ impl<'ctx> AppState<'ctx> { .. } if self.keybinds.contains_key(&Keybind::new(k, keymod)) => { let body = + // clone here because body can modify itself self.keybinds.get(&Keybind::new(k, keymod)).unwrap().clone(); self.eval_expr(&body); } -- cgit v1.2.3