mirror of
https://github.com/actix/actix-web.git
synced 2024-11-26 19:41:12 +00:00
Fix EncoderBody enum to align with Body::Message
This commit is contained in:
parent
a84b37199a
commit
e6078bf792
1 changed files with 2 additions and 2 deletions
|
@ -83,7 +83,7 @@ impl<B: MessageBody> Encoder<B> {
|
|||
enum EncoderBody<B> {
|
||||
Bytes(Bytes),
|
||||
Stream(#[pin] B),
|
||||
BoxedStream(#[pin] Box<dyn MessageBody>),
|
||||
BoxedStream(Box<dyn MessageBody + Unpin>),
|
||||
}
|
||||
|
||||
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::BoxedStream(b) => b.poll_next(cx),
|
||||
EncoderBody::BoxedStream(ref mut b) => Pin::new(b.as_mut()).poll_next(cx),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue