address review comments

This commit is contained in:
Ali MJ Al-Nasrawy 2021-12-17 01:01:20 +03:00
parent e9cec5be0c
commit 9a41bd8134
2 changed files with 11 additions and 1 deletions

View File

@ -134,7 +134,7 @@ mod foreign_impls {
impl<B> MessageBody for Box<B>
where
B: MessageBody + Unpin,
B: MessageBody + Unpin + ?Sized,
{
type Error = B::Error;

View File

@ -40,4 +40,14 @@ impl MessageBody for None {
) -> Poll<Option<Result<Bytes, Self::Error>>> {
Poll::Ready(Option::None)
}
#[inline]
fn is_complete_body(&self) -> bool {
true
}
#[inline]
fn take_complete_body(&mut self) -> Bytes {
Bytes::new()
}
}