Remove B type param (#1751)

Co-authored-by: Jonas Platte <[email protected]>
Co-authored-by: Michael Scofield <[email protected]>
This commit is contained in:
David Pedersen
2023-04-21 17:45:31 +02:00
co-authored by Jonas Platte Michael Scofield
parent 9be0ea934c
commit 4e4c29175f
100 changed files with 966 additions and 1160 deletions
+6 -2
View File
@@ -3,7 +3,7 @@
use crate::__composite_rejection as composite_rejection;
use crate::__define_rejection as define_rejection;
use crate::BoxError;
use crate::{BoxError, Error};
composite_rejection! {
/// Rejection type for extractors that buffer the request body. Used if the
@@ -19,7 +19,11 @@ impl FailedToBufferBody {
where
E: Into<BoxError>,
{
match err.into().downcast::<http_body::LengthLimitError>() {
let box_error = match err.into().downcast::<Error>() {
Ok(err) => err.into_inner(),
Err(err) => err,
};
match box_error.downcast::<http_body::LengthLimitError>() {
Ok(err) => Self::LengthLimitError(LengthLimitError::from_err(err)),
Err(err) => Self::UnknownBodyError(UnknownBodyError::from_err(err)),
}