From 6bdd9b07bbf2a8126d4867220c04f09cf3b1ae0b Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Mon, 22 Jun 2020 17:29:47 +0300 Subject: [PATCH] bin: remove unwrap from timer thread --- src/bin.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/bin.rs b/src/bin.rs index 6b93dce7..8ecbe24b 100644 --- a/src/bin.rs +++ b/src/bin.rs @@ -126,12 +126,10 @@ fn notify( .unwrap_or(false) { let value = buf[0]; - sender - .send_timeout( - ThreadEvent::UIEvent(UIEvent::Timer(value)), - Duration::from_millis(500), - ) - .unwrap(); + let _ = sender.send_timeout( + ThreadEvent::UIEvent(UIEvent::Timer(value)), + Duration::from_millis(2000), + ); } std::thread::sleep(std::time::Duration::from_millis(100));