diff --git a/src/event/source/unix.rs b/src/event/source/unix.rs index 7134f2b..34398e7 100644 --- a/src/event/source/unix.rs +++ b/src/event/source/unix.rs @@ -151,8 +151,7 @@ impl EventSource for UnixInternalEventSource { return Err(std::io::Error::new( std::io::ErrorKind::Interrupted, "Poll operation was woken up by `Waker::wake`", - ) - .into()); + )); } _ => unreachable!("Synchronize Evented handle registration & token handling"), } diff --git a/src/event/sys/unix/waker.rs b/src/event/sys/unix/waker.rs index ef08ed6..4509e9b 100644 --- a/src/event/sys/unix/waker.rs +++ b/src/event/sys/unix/waker.rs @@ -2,7 +2,7 @@ use std::sync::{Arc, Mutex}; use mio::{Registry, Token}; -use crate::{ErrorKind, Result}; +use crate::Result; /// Allows to wake up the `mio::Poll::poll()` method. /// This type wraps `mio::Waker`, for more information see its documentation. @@ -23,11 +23,7 @@ impl Waker { /// /// Readiness is set to `Ready::readable()`. pub(crate) fn wake(&self) -> Result<()> { - self.inner - .lock() - .unwrap() - .wake() - .map_err(ErrorKind::IoError) + self.inner.lock().unwrap().wake() } /// Resets the state so the same waker can be reused.