diff --git a/src/session.rs b/src/session.rs index ca971fe..7adebfc 100644 --- a/src/session.rs +++ b/src/session.rs @@ -131,7 +131,7 @@ impl Session { WaitForMultipleObjects(handles.len() as u32, &handles as _, FALSE, INFINITE) }; const WAIT_OBJECT_1: WAIT_EVENT = WAIT_OBJECT_0 + 1; - return match result { + match result { WAIT_FAILED => Err(util::get_last_error()?.into()), WAIT_OBJECT_0 => { //We have data! @@ -145,7 +145,7 @@ impl Session { //This should never happen panic!("WaitForMultipleObjects returned unexpected value {:?}", result); } - }; + } } /// Cancels any active calls to [`Session::receive_blocking`] making them instantly return Err(_) so that session can be shutdown cleanly