From 7631c0390e90d539b825ed27693a7a0bb1e31dc8 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Tue, 10 Dec 2019 16:55:53 -0800 Subject: [PATCH] Rename 'unstable-stream' feature to 'stream' (#733) --- .github/workflows/ci.yml | 6 +++--- Cargo.toml | 2 +- src/async_impl/body.rs | 6 +++--- src/async_impl/request.rs | 2 +- src/lib.rs | 2 +- tests/multipart.rs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45125c7..ca54f83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: - "feat.: blocking" - "feat.: gzip" - "feat.: json" - - "feat.: unstable-stream" + - "feat.: stream" # - "feat.: socks" # - "feat.: trust-dns" @@ -110,8 +110,8 @@ jobs: features: "--features gzip" - name: "feat.: json" features: "--features json" - - name: "feat.: unstable-stream" - features: "--features unstable-stream" + - name: "feat.: stream" + features: "--features stream" # - name: "feat.: socks" # features: "--features socks" # - name: "feat.: trust-dns" diff --git a/Cargo.toml b/Cargo.toml index 228863d..19b1ffa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ json = ["serde_json"] #trust-dns = ["trust-dns-resolver"] -unstable-stream = [] +stream = [] # Internal (PRIVATE!) features used to aid testing. # Don't rely on these whatsoever. They may disappear at anytime. diff --git a/src/async_impl/body.rs b/src/async_impl/body.rs index 8ff2d04..14d7bae 100644 --- a/src/async_impl/body.rs +++ b/src/async_impl/body.rs @@ -65,10 +65,10 @@ impl Body { /// # } /// ``` /// - /// # Unstable + /// # Optional /// - /// This requires the `unstable-stream` feature to be enabled. - #[cfg(feature = "unstable-stream")] + /// This requires the `stream` feature to be enabled. + #[cfg(feature = "stream")] pub fn wrap_stream(stream: S) -> Body where S: futures_core::stream::TryStream + Send + Sync + 'static, diff --git a/src/async_impl/request.rs b/src/async_impl/request.rs index e162c89..b9ddbae 100644 --- a/src/async_impl/request.rs +++ b/src/async_impl/request.rs @@ -573,7 +573,7 @@ mod tests { } #[test] - #[cfg(feature = "unstable-stream")] + #[cfg(feature = "stream")] fn try_clone_stream() { let chunks: Vec> = vec![ Ok("hello"), diff --git a/src/lib.rs b/src/lib.rs index 48ceffc..9092587 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -166,7 +166,7 @@ //! - **cookies**: Provides cookie session support. //! - **gzip**: Provides response body gzip decompression. //! - **json**: Provides serialization and deserialization for JSON bodies. -//! - **unstable-stream** *(unstable)*: Adds support for `futures::Stream`. +//! - **stream**: Adds support for `futures::Stream`. //! //! //! [hyper]: http://hyper.rs diff --git a/tests/multipart.rs b/tests/multipart.rs index 968a089..38896ed 100644 --- a/tests/multipart.rs +++ b/tests/multipart.rs @@ -55,7 +55,7 @@ async fn text_part() { assert_eq!(res.status(), reqwest::StatusCode::OK); } -#[cfg(feature = "unstable-stream")] +#[cfg(feature = "stream")] #[tokio::test] async fn stream_part() { use futures_util::{future, stream};