feat(body): put Stream impl for Body behind stream feature

BREAKING CHANGE: Using a `Body` as a `Stream`, and constructing one via
  `Body::wrap_stream`, require enabling the unstable `stream` feature.
This commit is contained in:
Sean McArthur
2019-09-05 14:46:12 -07:00
parent b3e5506261
commit 511ea3889b
4 changed files with 43 additions and 25 deletions

View File

@@ -156,17 +156,6 @@ impl AddrIncoming {
}
}
/*
impl Stream for AddrIncoming {
type Item = io::Result<AddrStream>;
fn poll_next(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Option<Self::Item>> {
let result = ready!(self.poll_next_(cx));
Poll::Ready(Some(result))
}
}
*/
impl Accept for AddrIncoming {
type Conn = AddrStream;
type Error = io::Error;