Rename 'unstable-stream' feature to 'stream' (#733)
This commit is contained in:
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -60,7 +60,7 @@ jobs:
|
|||||||
- "feat.: blocking"
|
- "feat.: blocking"
|
||||||
- "feat.: gzip"
|
- "feat.: gzip"
|
||||||
- "feat.: json"
|
- "feat.: json"
|
||||||
- "feat.: unstable-stream"
|
- "feat.: stream"
|
||||||
# - "feat.: socks"
|
# - "feat.: socks"
|
||||||
# - "feat.: trust-dns"
|
# - "feat.: trust-dns"
|
||||||
|
|
||||||
@@ -110,8 +110,8 @@ jobs:
|
|||||||
features: "--features gzip"
|
features: "--features gzip"
|
||||||
- name: "feat.: json"
|
- name: "feat.: json"
|
||||||
features: "--features json"
|
features: "--features json"
|
||||||
- name: "feat.: unstable-stream"
|
- name: "feat.: stream"
|
||||||
features: "--features unstable-stream"
|
features: "--features stream"
|
||||||
# - name: "feat.: socks"
|
# - name: "feat.: socks"
|
||||||
# features: "--features socks"
|
# features: "--features socks"
|
||||||
# - name: "feat.: trust-dns"
|
# - name: "feat.: trust-dns"
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ json = ["serde_json"]
|
|||||||
|
|
||||||
#trust-dns = ["trust-dns-resolver"]
|
#trust-dns = ["trust-dns-resolver"]
|
||||||
|
|
||||||
unstable-stream = []
|
stream = []
|
||||||
|
|
||||||
# Internal (PRIVATE!) features used to aid testing.
|
# Internal (PRIVATE!) features used to aid testing.
|
||||||
# Don't rely on these whatsoever. They may disappear at anytime.
|
# Don't rely on these whatsoever. They may disappear at anytime.
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ impl Body {
|
|||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// # Unstable
|
/// # Optional
|
||||||
///
|
///
|
||||||
/// This requires the `unstable-stream` feature to be enabled.
|
/// This requires the `stream` feature to be enabled.
|
||||||
#[cfg(feature = "unstable-stream")]
|
#[cfg(feature = "stream")]
|
||||||
pub fn wrap_stream<S>(stream: S) -> Body
|
pub fn wrap_stream<S>(stream: S) -> Body
|
||||||
where
|
where
|
||||||
S: futures_core::stream::TryStream + Send + Sync + 'static,
|
S: futures_core::stream::TryStream + Send + Sync + 'static,
|
||||||
|
|||||||
@@ -573,7 +573,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "unstable-stream")]
|
#[cfg(feature = "stream")]
|
||||||
fn try_clone_stream() {
|
fn try_clone_stream() {
|
||||||
let chunks: Vec<Result<_, ::std::io::Error>> = vec![
|
let chunks: Vec<Result<_, ::std::io::Error>> = vec![
|
||||||
Ok("hello"),
|
Ok("hello"),
|
||||||
|
|||||||
@@ -166,7 +166,7 @@
|
|||||||
//! - **cookies**: Provides cookie session support.
|
//! - **cookies**: Provides cookie session support.
|
||||||
//! - **gzip**: Provides response body gzip decompression.
|
//! - **gzip**: Provides response body gzip decompression.
|
||||||
//! - **json**: Provides serialization and deserialization for JSON bodies.
|
//! - **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
|
//! [hyper]: http://hyper.rs
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ async fn text_part() {
|
|||||||
assert_eq!(res.status(), reqwest::StatusCode::OK);
|
assert_eq!(res.status(), reqwest::StatusCode::OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "unstable-stream")]
|
#[cfg(feature = "stream")]
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn stream_part() {
|
async fn stream_part() {
|
||||||
use futures_util::{future, stream};
|
use futures_util::{future, stream};
|
||||||
|
|||||||
Reference in New Issue
Block a user