From 45efba27df90650bf4669738102ad6e432ddc75d Mon Sep 17 00:00:00 2001 From: Laurentiu Nicola Date: Wed, 2 May 2018 21:45:33 +0300 Subject: [PATCH] feat(body): add From> impl for Body --- src/body.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/body.rs b/src/body.rs index 85155b0fb8..ebd5364568 100644 --- a/src/body.rs +++ b/src/body.rs @@ -421,6 +421,18 @@ impl From for Body { } } +impl From> for Body +where + S: Stream + Send + 'static, + S::Error: Into>, + Chunk: From, +{ + #[inline] + fn from(stream: Box) -> Body { + Body::wrap_stream(stream) + } +} + impl From for Body { #[inline] fn from (bytes: Bytes) -> Body {