refactor: remove pointless clone()'s & variable declarations
This commit is contained in:
+4
-4
@@ -104,11 +104,11 @@ async fn run_app<B: Backend + Send>(
|
||||
} else {
|
||||
let mut now = Instant::now();
|
||||
loop {
|
||||
if terminal.draw(|f| ui(f, &app_data, &gui_state)).is_err() {
|
||||
return Err(AppError::Terminal);
|
||||
if terminal.draw(|f| ui(f, &app_data, &gui_state)).is_err() {
|
||||
return Err(AppError::Terminal);
|
||||
}
|
||||
// TODO could only draw if in gui mode, that way all inputs & docker commands will run, and can just trace!("{event"}) all over the place
|
||||
// refactor this into own function, so can be called without drawing to the terminal
|
||||
// TODO could only draw if in gui mode, that way all inputs & docker commands will run, and can just trace!("{event"}) all over the place
|
||||
// refactor this into own function, so can be called without drawing to the terminal
|
||||
if crossterm::event::poll(input_poll_rate).unwrap_or(false) {
|
||||
if let Ok(event) = event::read() {
|
||||
if let Event::Key(key) = event {
|
||||
|
||||
Reference in New Issue
Block a user