From 26b4ef2bb315fdddb958d7f3d60b153466ca7039 Mon Sep 17 00:00:00 2001 From: Brad Culwell Date: Thu, 6 Jun 2024 05:06:21 -0500 Subject: [PATCH] fix: fix tests running indefinitely --- src/app.rs | 3 +-- src/widget/results.rs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/app.rs b/src/app.rs index 5bac965..7edc980 100644 --- a/src/app.rs +++ b/src/app.rs @@ -376,8 +376,7 @@ impl App { loop { tokio::select! { biased; - Some(Event::Key(key)) = rx_evt.recv() => { - let evt = Event::Key(key); + Some(evt) = rx_evt.recv() => { #[cfg(unix)] self.on::(&evt, ctx, terminal); #[cfg(not(unix))] diff --git a/src/widget/results.rs b/src/widget/results.rs index 7d1288d..fba2929 100644 --- a/src/widget/results.rs +++ b/src/widget/results.rs @@ -21,7 +21,7 @@ use super::{border_block, centered_rect, Corner, VirtualStatefulTable}; pub struct ResultsWidget { pub table: VirtualStatefulTable, control_space: bool, - draw_count: u64, + // draw_count: u64, } impl ResultsWidget { @@ -58,7 +58,7 @@ impl Default for ResultsWidget { ResultsWidget { table: VirtualStatefulTable::new(), control_space: false, - draw_count: 0, + // draw_count: 0, } } } @@ -174,12 +174,12 @@ impl super::Widget for ResultsWidget { } } - if let Some((bl, area)) = - Corner::BottomLeft.try_title(format!("{} draws", self.draw_count), area, false) - { - f.render_widget(bl, area); - self.draw_count += 1; - } + // if let Some((bl, area)) = + // Corner::BottomLeft.try_title(format!("{} draws", self.draw_count), area, false) + // { + // f.render_widget(bl, area); + // self.draw_count += 1; + // } } fn handle_event(&mut self, ctx: &mut Context, e: &Event) {