mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-07 00:00:12 +02:00
Remove B type param (#1751)
Co-authored-by: Jonas Platte <[email protected]> Co-authored-by: Michael Scofield <[email protected]>
This commit is contained in:
co-authored by
Jonas Platte
Michael Scofield
parent
9be0ea934c
commit
4e4c29175f
@@ -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)),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user