Skip to content

Commit

Permalink
realm-io: refine constraints on syscall closure
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyrchien committed Apr 27, 2024
1 parent 314dea9 commit 60aa8b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions realm_io/src/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ pub trait AsyncRawIO: AsRawFd {
}
}

fn poll_read_raw<S>(&self, cx: &mut Context<'_>, syscall: S) -> Poll<Result<usize>>
fn poll_read_raw<S>(&self, cx: &mut Context<'_>, mut syscall: S) -> Poll<Result<usize>>
where
S: FnOnce() -> isize + Copy,
S: FnMut() -> isize,
{
loop {
ready!(Self::x_poll_read_ready(self, cx))?;
Expand All @@ -39,9 +39,9 @@ pub trait AsyncRawIO: AsRawFd {
}
}

fn poll_write_raw<S>(&self, cx: &mut Context<'_>, syscall: S) -> Poll<Result<usize>>
fn poll_write_raw<S>(&self, cx: &mut Context<'_>, mut syscall: S) -> Poll<Result<usize>>
where
S: FnOnce() -> isize + Copy,
S: FnMut() -> isize,
{
loop {
ready!(Self::x_poll_write_ready(self, cx))?;
Expand Down

0 comments on commit 60aa8b9

Please sign in to comment.