From 8079ac91f445dd765db66398ff66b1adfd376cc8 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Thu, 13 May 2021 22:25:27 -0400 Subject: [PATCH] Remove extra macro variable --- src/main.rs | 6 +----- src/util/event.rs | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index abf4cf6..eca7aab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,7 +36,6 @@ struct App { calculator: Calculator, error_msg: Option, state: AppState, - current_macro: Option, } enum CalculatorResponse { @@ -54,7 +53,6 @@ impl Default for App { calculator, error_msg, state: AppState::Calculator, - current_macro: None, } } } @@ -274,6 +272,7 @@ fn main() -> Result<(), Box> { }; } + // Slurp events without a redraw for e in events.try_iter() { match e { Event::Input(key) => { @@ -284,12 +283,9 @@ fn main() -> Result<(), Box> { Err(e) => Some(format!("{}", e)), }; } - Event::MacroEnd => app.current_macro = None, _ => continue, } } - - app.current_macro = None; } } diff --git a/src/util/event.rs b/src/util/event.rs index 7accf73..a5ca790 100644 --- a/src/util/event.rs +++ b/src/util/event.rs @@ -14,7 +14,6 @@ use termion::input::TermRead; pub enum Event { Input(I), Tick, - MacroEnd, } /// A small event handler that wrap termion input and tick events. Each event