feat(body): Update Payload to be a trait alias of http_body::Body (#1908)

This commit is contained in:
Lucio Franco
2019-08-22 14:13:27 -07:00
committed by Sean McArthur
parent 49b12c415d
commit 79c32f8953
9 changed files with 84 additions and 100 deletions

View File

@@ -178,17 +178,17 @@ where
}
match ready!(Pin::new(&mut self.stream).poll_trailers(cx)) {
Some(Ok(trailers)) => {
Ok(Some(trailers)) => {
self.body_tx
.send_trailers(trailers)
.map_err(crate::Error::new_body_write)?;
return Poll::Ready(Ok(()));
}
Some(Err(e)) => return Poll::Ready(Err(self.on_user_err(e))),
None => {
Ok(None) => {
// There were no trailers, so send an empty DATA frame...
return Poll::Ready(self.send_eos_frame());
}
Err(e) => return Poll::Ready(Err(self.on_user_err(e))),
}
}
}