diff --git a/Cargo.toml b/Cargo.toml index b8724fe..31bc5c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "async-speed-limit" -version = "0.4.1" +version = "0.4.2" authors = ["The TiKV Project Developers"] license = "MIT OR Apache-2.0" edition = "2018" diff --git a/src/io.rs b/src/io.rs index a0a89b2..2360dfd 100644 --- a/src/io.rs +++ b/src/io.rs @@ -17,7 +17,7 @@ impl futures_io::AsyncRead for Resource, buf: &mut [u8], ) -> Poll> { - self.poll_limited(cx, (), length_of_result_usize, |r, cx, _| { + self.poll_limited(cx, (), length_of_result_usize, |r, cx, ()| { r.poll_read(cx, buf) }) } @@ -27,7 +27,7 @@ impl futures_io::AsyncRead for Resource, bufs: &mut [IoSliceMut<'_>], ) -> Poll> { - self.poll_limited(cx, (), length_of_result_usize, |r, cx, _| { + self.poll_limited(cx, (), length_of_result_usize, |r, cx, ()| { r.poll_read_vectored(cx, bufs) }) } @@ -39,7 +39,7 @@ impl futures_io::AsyncWrite for Resource, buf: &[u8], ) -> Poll> { - self.poll_limited(cx, (), length_of_result_usize, |r, cx, _| { + self.poll_limited(cx, (), length_of_result_usize, |r, cx, ()| { r.poll_write(cx, buf) }) } @@ -49,7 +49,7 @@ impl futures_io::AsyncWrite for Resource, bufs: &[IoSlice<'_>], ) -> Poll> { - self.poll_limited(cx, (), length_of_result_usize, |r, cx, _| { + self.poll_limited(cx, (), length_of_result_usize, |r, cx, ()| { r.poll_write_vectored(cx, bufs) }) } @@ -244,7 +244,7 @@ mod tests { } #[cfg(test)] -#[cfg(feature = "standard-clock")] +#[cfg(all(feature = "tokio", feature = "standard-clock"))] mod tokio_tests { use std::{ io,