Skip to content

Commit 0e74acf

Browse files
authored
Merge pull request #9 from tikv/remove-read-initializer
*: remove read-initializer feature
2 parents 82c25ea + 33adfaa commit 0e74acf

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "async-speed-limit"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
authors = ["The TiKV Project Developers"]
55
license = "MIT OR Apache-2.0"
66
edition = "2018"
@@ -13,7 +13,7 @@ all-features = true
1313

1414
[dependencies]
1515
futures-timer = { version = "3.0.2", optional = true }
16-
futures-io = { version = "0.3.1", optional = true }
16+
futures-io = { version = "0.3.19", optional = true }
1717
futures-core = { version = "0.3.1", optional = true }
1818
pin-project-lite = "0.2.0"
1919
tokio = { version = "1", optional = true }
@@ -22,7 +22,7 @@ tokio = { version = "1", optional = true }
2222
default = ["futures-io", "fused-future", "standard-clock"]
2323
standard-clock = ["futures-timer"]
2424
fused-future = ["futures-core"]
25-
read-initializer = ["futures-io/unstable", "futures-io/read-initializer"]
25+
read-initializer = [] # This feature has been deprecated. It is only kept for downstream compatibility.
2626

2727
[dev-dependencies]
2828
futures-executor = "0.3.1"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ the types.
6868
| **standard-clock** (default) | [futures-timer] | Enables the `clock::StandardClock` struct. |
6969
| **fused-future** (default) | [futures-core] | Implements `FusedFuture` on `limiter::Consume`. |
7070
| **futures-io** (default) | [futures-io] | Implements `AsyncRead` and `AsyncWrite` on `limiter::Resource`. |
71-
| **read-initializer** | [futures-io] | Implements `AsyncRead::initializer`.<br>Unstable and requires nightly compiler to enable. |
71+
| ~~**read-initializer**~~ | - | Deprecated and does nothing. This feature has been removed since `futures-io 0.3.19`. |
7272

7373
[futures-core]: https://crates.io/crates/futures-core
7474
[futures-io]: https://crates.io/crates/futures-io

src/io.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ fn length_of_result_usize<B>(a: &io::Result<usize>, _: &B) -> usize {
1212
}
1313

1414
impl<R: futures_io::AsyncRead, C: Clock> futures_io::AsyncRead for Resource<R, C> {
15-
#[cfg(feature = "read-initializer")]
16-
#[allow(unsafe_code)]
17-
unsafe fn initializer(&self) -> io::Initializer {
18-
self.get_ref().initializer()
19-
}
20-
2115
fn poll_read(
2216
self: Pin<&mut Self>,
2317
cx: &mut Context<'_>,

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
clippy::pedantic
1616
)]
1717
#![allow(clippy::module_name_repetitions, clippy::must_use_candidate)]
18-
#![cfg_attr(feature = "read-initializer", feature(read_initializer))]
1918
#![doc = include_str!("../README.md")]
2019

2120
pub mod clock;

0 commit comments

Comments
 (0)