diff --git a/realm_io/src/linux/mod.rs b/realm_io/src/linux/mod.rs index a30193fb..ef12dd61 100644 --- a/realm_io/src/linux/mod.rs +++ b/realm_io/src/linux/mod.rs @@ -22,9 +22,9 @@ pub trait AsyncRawIO: AsRawFd { } } - fn poll_read_raw(&self, cx: &mut Context<'_>, syscall: S) -> Poll> + fn poll_read_raw(&self, cx: &mut Context<'_>, mut syscall: S) -> Poll> where - S: FnOnce() -> isize + Copy, + S: FnMut() -> isize, { loop { ready!(Self::x_poll_read_ready(self, cx))?; @@ -39,9 +39,9 @@ pub trait AsyncRawIO: AsRawFd { } } - fn poll_write_raw(&self, cx: &mut Context<'_>, syscall: S) -> Poll> + fn poll_write_raw(&self, cx: &mut Context<'_>, mut syscall: S) -> Poll> where - S: FnOnce() -> isize + Copy, + S: FnMut() -> isize, { loop { ready!(Self::x_poll_write_ready(self, cx))?;