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

simplify MessageBody::complete_body interface (#2522)

This commit is contained in:
Ali MJ Al-Nasrawy
2021-12-17 22:09:08 +03:00
committed by GitHub
parent 2cf27863cb
commit 57ea322ce5
7 changed files with 149 additions and 292 deletions

View File

@ -22,7 +22,7 @@ use crate::{
config::ServiceConfig,
error::{DispatchError, ParseError, PayloadError},
service::HttpFlow,
Extensions, OnConnectData, Request, Response, StatusCode,
Error, Extensions, OnConnectData, Request, Response, StatusCode,
};
use super::{
@ -494,7 +494,9 @@ where
}
Poll::Ready(Some(Err(err))) => {
return Err(DispatchError::Body(err.into()))
return Err(DispatchError::Body(
Error::new_body().with_cause(err).into(),
))
}
Poll::Pending => return Ok(PollResponse::DoNothing),