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,
error_msg: Option<String>,
state: AppState,
current_macro: Option<char>,
}
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<dyn Error>> {
};
}
// Slurp events without a redraw
for e in events.try_iter() {
match e {
Event::Input(key) => {
@ -284,12 +283,9 @@ fn main() -> Result<(), Box<dyn Error>> {
Err(e) => Some(format!("{}", e)),
};
}
Event::MacroEnd => app.current_macro = None,
_ => continue,
}
}
app.current_macro = None;
}
}

View File

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