diff --git a/src/poll.rs b/src/poll.rs index c7ebc54d..a951aca7 100644 --- a/src/poll.rs +++ b/src/poll.rs @@ -41,7 +41,7 @@ pub fn start_polling_thread() -> Receiver> { if !batch.is_empty() && last_send.elapsed() > MAX_BATCHING_DURATION { - tx1.send(batch).unwrap(); + tx1.send(batch).expect("send input event failed"); batch = Vec::new(); last_send = Instant::now(); } @@ -49,7 +49,8 @@ pub fn start_polling_thread() -> Receiver> { }); rayon_core::spawn(move || loop { - tx.send(vec![QueueEvent::Tick]).unwrap(); + tx.send(vec![QueueEvent::Tick]) + .expect("send tick event failed"); sleep(TICK_DURATION); });