1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-02 13:29:24 +00:00

passthrough StreamLog error type

This commit is contained in:
Rob Ede 2021-12-17 01:27:27 +00:00
parent 3c0d059d92
commit a2467718ac
No known key found for this signature in database
GPG key ID: 97C636207D3EF933

View file

@ -322,13 +322,10 @@ pin_project! {
}
}
impl<B> MessageBody for StreamLog<B>
where
B: MessageBody,
B::Error: Into<Error>,
{
type Error = Error;
impl<B: MessageBody> MessageBody for StreamLog<B> {
type Error = B::Error;
#[inline]
fn size(&self) -> BodySize {
self.body.size()
}
@ -344,7 +341,7 @@ where
*this.size += chunk.len();
Poll::Ready(Some(Ok(chunk)))
}
Some(Err(err)) => Poll::Ready(Some(Err(err.into()))),
Some(Err(err)) => Poll::Ready(Some(Err(err))),
None => Poll::Ready(None),
}
}