Skip to content

Commit

Permalink
Merge pull request #11 from tikv/prepare-0.4.2
Browse files Browse the repository at this point in the history
*: set version to 0.4.2 and fix some tests and warnings
  • Loading branch information
kennytm authored Oct 5, 2024
2 parents a113aef + 9ef0a70 commit 7773017
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
10 changes: 5 additions & 5 deletions src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl<R: futures_io::AsyncRead, C: Clock> futures_io::AsyncRead for Resource<R, C
cx: &mut Context<'_>,
buf: &mut [u8],
) -> Poll<io::Result<usize>> {
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)
})
}
Expand All @@ -27,7 +27,7 @@ impl<R: futures_io::AsyncRead, C: Clock> futures_io::AsyncRead for Resource<R, C
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>],
) -> Poll<io::Result<usize>> {
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)
})
}
Expand All @@ -39,7 +39,7 @@ impl<R: futures_io::AsyncWrite, C: Clock> futures_io::AsyncWrite for Resource<R,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<io::Result<usize>> {
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)
})
}
Expand All @@ -49,7 +49,7 @@ impl<R: futures_io::AsyncWrite, C: Clock> futures_io::AsyncWrite for Resource<R,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>],
) -> Poll<io::Result<usize>> {
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)
})
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7773017

Please sign in to comment.