Skip to content

Commit 7773017

Browse files
authored
Merge pull request #11 from tikv/prepare-0.4.2
*: set version to 0.4.2 and fix some tests and warnings
2 parents a113aef + 9ef0a70 commit 7773017

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "async-speed-limit"
3-
version = "0.4.1"
3+
version = "0.4.2"
44
authors = ["The TiKV Project Developers"]
55
license = "MIT OR Apache-2.0"
66
edition = "2018"

src/io.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl<R: futures_io::AsyncRead, C: Clock> futures_io::AsyncRead for Resource<R, C
1717
cx: &mut Context<'_>,
1818
buf: &mut [u8],
1919
) -> Poll<io::Result<usize>> {
20-
self.poll_limited(cx, (), length_of_result_usize, |r, cx, _| {
20+
self.poll_limited(cx, (), length_of_result_usize, |r, cx, ()| {
2121
r.poll_read(cx, buf)
2222
})
2323
}
@@ -27,7 +27,7 @@ impl<R: futures_io::AsyncRead, C: Clock> futures_io::AsyncRead for Resource<R, C
2727
cx: &mut Context<'_>,
2828
bufs: &mut [IoSliceMut<'_>],
2929
) -> Poll<io::Result<usize>> {
30-
self.poll_limited(cx, (), length_of_result_usize, |r, cx, _| {
30+
self.poll_limited(cx, (), length_of_result_usize, |r, cx, ()| {
3131
r.poll_read_vectored(cx, bufs)
3232
})
3333
}
@@ -39,7 +39,7 @@ impl<R: futures_io::AsyncWrite, C: Clock> futures_io::AsyncWrite for Resource<R,
3939
cx: &mut Context<'_>,
4040
buf: &[u8],
4141
) -> Poll<io::Result<usize>> {
42-
self.poll_limited(cx, (), length_of_result_usize, |r, cx, _| {
42+
self.poll_limited(cx, (), length_of_result_usize, |r, cx, ()| {
4343
r.poll_write(cx, buf)
4444
})
4545
}
@@ -49,7 +49,7 @@ impl<R: futures_io::AsyncWrite, C: Clock> futures_io::AsyncWrite for Resource<R,
4949
cx: &mut Context<'_>,
5050
bufs: &[IoSlice<'_>],
5151
) -> Poll<io::Result<usize>> {
52-
self.poll_limited(cx, (), length_of_result_usize, |r, cx, _| {
52+
self.poll_limited(cx, (), length_of_result_usize, |r, cx, ()| {
5353
r.poll_write_vectored(cx, bufs)
5454
})
5555
}
@@ -244,7 +244,7 @@ mod tests {
244244
}
245245

246246
#[cfg(test)]
247-
#[cfg(feature = "standard-clock")]
247+
#[cfg(all(feature = "tokio", feature = "standard-clock"))]
248248
mod tokio_tests {
249249
use std::{
250250
io,

0 commit comments

Comments
 (0)