Skip to content

Commit

Permalink
fix: fix tests running indefinitely
Browse files Browse the repository at this point in the history
  • Loading branch information
Beastwick18 committed Jun 6, 2024
1 parent a69320c commit 26b4ef2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<B, TEST>(&evt, ctx, terminal);
#[cfg(not(unix))]
Expand Down
16 changes: 8 additions & 8 deletions src/widget/results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -58,7 +58,7 @@ impl Default for ResultsWidget {
ResultsWidget {
table: VirtualStatefulTable::new(),
control_space: false,
draw_count: 0,
// draw_count: 0,
}
}
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 26b4ef2

Please sign in to comment.