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.
1 parent bc6af88 commit c3c35e8Copy full SHA for c3c35e8
src/body.rs
@@ -421,15 +421,17 @@ impl From<Chunk> for Body {
421
}
422
423
424
-impl<S> From<Box<S>> for Body
425
-where
426
- S: Stream + Send + 'static,
427
- S::Error: Into<Box<::std::error::Error + Send + Sync>>,
428
- Chunk: From<S::Item>,
+impl
+ From<Box<Stream<Item = Chunk, Error = Box<::std::error::Error + Send + Sync>> + Send + 'static>>
+ for Body
429
{
430
#[inline]
431
- fn from(stream: Box<S>) -> Body {
432
- Body::wrap_stream(stream)
+ fn from(
+ stream: Box<
+ Stream<Item = Chunk, Error = Box<::std::error::Error + Send + Sync>> + Send + 'static,
+ >,
433
+ ) -> Body {
434
+ Body::new(Kind::Wrapped(stream))
435
436
437
0 commit comments