1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

This is a squashed commit:

- Convert MessageBody to accept Pin in poll_next

- add CHANGES and increase versions aligned to semver

- update crates to accomodate MessageBody Pin change

- fix tests and dependencies
This commit is contained in:
Maksym Vorobiov
2020-01-29 11:15:13 +03:00
committed by Yuki Okushi
parent a4148de226
commit 9d04b250f9
24 changed files with 247 additions and 174 deletions

View File

@ -168,7 +168,7 @@ struct ServiceResponse<F, I, E, B> {
#[pin_project::pin_project]
enum ServiceResponseState<F, B> {
ServiceCall(#[pin] F, Option<SendResponse<Bytes>>),
SendPayload(SendStream<Bytes>, ResponseBody<B>),
SendPayload(SendStream<Bytes>, #[pin] ResponseBody<B>),
}
impl<F, I, E, B> ServiceResponse<F, I, E, B>
@ -338,7 +338,7 @@ where
}
}
} else {
match body.poll_next(cx) {
match body.as_mut().poll_next(cx) {
Poll::Pending => return Poll::Pending,
Poll::Ready(None) => {
if let Err(e) = stream.send_data(Bytes::new(), true) {