refactor(body): use HttpBody with extra bounds instead of Payload trait

This commit is contained in:
Dirkjan Ochtman
2020-04-19 21:59:52 +02:00
committed by Sean McArthur
parent 203621e3be
commit aac0e2dd57
20 changed files with 142 additions and 243 deletions

View File

@@ -65,7 +65,7 @@ pub(crate) enum Parse {
#[derive(Debug, PartialEq)]
pub(crate) enum User {
/// Error calling user's Payload::poll_data().
/// Error calling user's HttpBody::poll_data().
Body,
/// Error calling user's MakeService.
MakeService,
@@ -316,7 +316,7 @@ impl Error {
Kind::Http2 => "http2 error",
Kind::Io => "connection error",
Kind::User(User::Body) => "error from user's Payload stream",
Kind::User(User::Body) => "error from user's HttpBody stream",
Kind::User(User::MakeService) => "error from user's MakeService",
Kind::User(User::Service) => "error from user's Service",
Kind::User(User::UnexpectedHeader) => "user sent unexpected header",