From 889d67a356a163fb444a4e7921394c765695427a Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 5 Mar 2019 21:19:12 -0800 Subject: [PATCH] add Stream impl for ResponseBody --- src/body.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/body.rs b/src/body.rs index d72f6c378..b7e8ec98a 100644 --- a/src/body.rs +++ b/src/body.rs @@ -91,6 +91,15 @@ impl MessageBody for ResponseBody { } } +impl Stream for ResponseBody { + type Item = Bytes; + type Error = Error; + + fn poll(&mut self) -> Poll, Self::Error> { + self.poll_next() + } +} + /// Represents various types of http message body. pub enum Body { /// Empty response. `Content-Length` header is not set.