mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-18 22:01:50 +01:00
Fix EncoderBody enum to align with Body::Message
This commit is contained in:
parent
a84b37199a
commit
e6078bf792
@ -83,7 +83,7 @@ impl<B: MessageBody> Encoder<B> {
|
|||||||
enum EncoderBody<B> {
|
enum EncoderBody<B> {
|
||||||
Bytes(Bytes),
|
Bytes(Bytes),
|
||||||
Stream(#[pin] B),
|
Stream(#[pin] B),
|
||||||
BoxedStream(#[pin] Box<dyn MessageBody>),
|
BoxedStream(Box<dyn MessageBody + Unpin>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<B: MessageBody> MessageBody for EncoderBody<B> {
|
impl<B: MessageBody> MessageBody for EncoderBody<B> {
|
||||||
@ -107,7 +107,7 @@ impl<B: MessageBody> MessageBody for EncoderBody<B> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EncoderBody::Stream(b) => b.poll_next(cx),
|
EncoderBody::Stream(b) => b.poll_next(cx),
|
||||||
EncoderBody::BoxedStream(b) => b.poll_next(cx),
|
EncoderBody::BoxedStream(ref mut b) => Pin::new(b.as_mut()).poll_next(cx),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user