Remove extra macro variable

This commit is contained in:
Austen Adler 2021-05-13 22:25:27 -04:00
parent 426c6850f2
commit 8079ac91f4
2 changed files with 1 additions and 6 deletions

View File

@ -36,7 +36,6 @@ struct App {
calculator: Calculator, calculator: Calculator,
error_msg: Option<String>, error_msg: Option<String>,
state: AppState, state: AppState,
current_macro: Option<char>,
} }
enum CalculatorResponse { enum CalculatorResponse {
@ -54,7 +53,6 @@ impl Default for App {
calculator, calculator,
error_msg, error_msg,
state: AppState::Calculator, state: AppState::Calculator,
current_macro: None,
} }
} }
} }
@ -274,6 +272,7 @@ fn main() -> Result<(), Box<dyn Error>> {
}; };
} }
// Slurp events without a redraw
for e in events.try_iter() { for e in events.try_iter() {
match e { match e {
Event::Input(key) => { Event::Input(key) => {
@ -284,12 +283,9 @@ fn main() -> Result<(), Box<dyn Error>> {
Err(e) => Some(format!("{}", e)), Err(e) => Some(format!("{}", e)),
}; };
} }
Event::MacroEnd => app.current_macro = None,
_ => continue, _ => continue,
} }
} }
app.current_macro = None;
} }
} }

View File

@ -14,7 +14,6 @@ use termion::input::TermRead;
pub enum Event<I> { pub enum Event<I> {
Input(I), Input(I),
Tick, Tick,
MacroEnd,
} }
/// A small event handler that wrap termion input and tick events. Each event /// A small event handler that wrap termion input and tick events. Each event