We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
wrap_stream
1 parent 47407f5 commit e6a7e33Copy full SHA for e6a7e33
src/body/body.rs
@@ -129,17 +129,16 @@ impl Body {
129
/// # Example
130
///
131
/// ```
132
- /// # extern crate futures;
133
- /// # extern crate hyper;
134
/// # use hyper::Body;
+ /// # use futures_util;
135
/// # fn main() {
136
- /// let chunks = vec![
137
- /// "hello",
138
- /// " ",
139
- /// "world",
+ /// let chunks: Vec<Result<_, ::std::io::Error>> = vec![
+ /// Ok("hello"),
+ /// Ok(" "),
+ /// Ok("world"),
140
/// ];
141
142
- /// let stream = futures::stream::iter_ok::<_, ::std::io::Error>(chunks);
+ /// let stream = futures_util::stream::iter(chunks);
143
144
/// let body = Body::wrap_stream(stream);
145
/// # }
0 commit comments