timer: setup_timeout_handler cannot fail

and if it does it panics anyway

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2018-12-27 10:36:05 +01:00
parent bcd879cfb3
commit fba3437f1e
1 changed files with 1 additions and 2 deletions

View File

@ -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 /// Setup our timeout-signal workflow. This establishes the signal handler for
/// our `SIGTIMEOUT` and should be called once during initialization. /// our `SIGTIMEOUT` and should be called once during initialization.
#[inline] #[inline]
pub fn setup_timeout_handler() -> io::Result<()> { pub fn setup_timeout_handler() {
SETUP_TIMEOUT_HANDLER.call_once(|| { SETUP_TIMEOUT_HANDLER.call_once(|| {
// We unwrap here. // We unwrap here.
// If setting up this handler fails you have other problems already, // 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. // goes to die.
do_setup_timeout_handler().unwrap(); do_setup_timeout_handler().unwrap();
}); });
Ok(())
} }
/// This guards the state of the timeout signal: We want it blocked usually. /// This guards the state of the timeout signal: We want it blocked usually.