From df2592f2c8aa6edbea0e46a319435e27b8998859 Mon Sep 17 00:00:00 2001 From: Alexandre Pasmantier <47638216+alexpasmantier@users.noreply.github.com> Date: Sat, 8 Feb 2025 15:21:54 +0100 Subject: [PATCH] fix(events): remove sorting and deduplicating incoming actions (#356) Fixes #355 --- television/app.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/television/app.rs b/television/app.rs index f1e7de5..65ae958 100644 --- a/television/app.rs +++ b/television/app.rs @@ -79,7 +79,7 @@ impl From for AppOutput { } const EVENT_BUF_SIZE: usize = 4; -const ACTION_BUF_SIZE: usize = 16; +const ACTION_BUF_SIZE: usize = 8; impl App { pub fn new( @@ -246,8 +246,6 @@ impl App { buf: &mut Vec, ) -> Result { if self.action_rx.recv_many(buf, ACTION_BUF_SIZE).await > 0 { - buf.sort_unstable(); - buf.dedup(); for action in buf.drain(..) { if action != Action::Tick { trace!("{action:?}");