Remove extra macro variable
This commit is contained in:
parent
426c6850f2
commit
8079ac91f4
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user