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.: 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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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<S>(stream: S) -> Body
|
||||
where
|
||||
S: futures_core::stream::TryStream + Send + Sync + 'static,
|
||||
|
||||
@@ -573,7 +573,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "unstable-stream")]
|
||||
#[cfg(feature = "stream")]
|
||||
fn try_clone_stream() {
|
||||
let chunks: Vec<Result<_, ::std::io::Error>> = vec![
|
||||
Ok("hello"),
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user