From fba3437f1eb7cae3120c10757f91cda5a6cdad7c Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 27 Dec 2018 10:36:05 +0100 Subject: [PATCH] timer: setup_timeout_handler cannot fail and if it does it panics anyway Signed-off-by: Wolfgang Bumiller --- src/tools/timer.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools/timer.rs b/src/tools/timer.rs index 22f3bd4d..cf01b204 100644 --- a/src/tools/timer.rs +++ b/src/tools/timer.rs @@ -269,7 +269,7 @@ static SETUP_TIMEOUT_HANDLER: std::sync::Once = std::sync::Once::new(); /// Setup our timeout-signal workflow. This establishes the signal handler for /// our `SIGTIMEOUT` and should be called once during initialization. #[inline] -pub fn setup_timeout_handler() -> io::Result<()> { +pub fn setup_timeout_handler() { SETUP_TIMEOUT_HANDLER.call_once(|| { // We unwrap here. // If setting up this handler fails you have other problems already, @@ -277,7 +277,6 @@ pub fn setup_timeout_handler() -> io::Result<()> { // goes to die. do_setup_timeout_handler().unwrap(); }); - Ok(()) } /// This guards the state of the timeout signal: We want it blocked usually.