mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01:00
Run Rustfmt
This commit is contained in:
parent
133d33d72c
commit
2a38f5c757
@ -99,10 +99,12 @@ impl From<MeilisearchHttpError> for aweb::Error {
|
|||||||
impl From<aweb::error::PayloadError> for MeilisearchHttpError {
|
impl From<aweb::error::PayloadError> for MeilisearchHttpError {
|
||||||
fn from(error: aweb::error::PayloadError) -> Self {
|
fn from(error: aweb::error::PayloadError) -> Self {
|
||||||
match error {
|
match error {
|
||||||
aweb::error::PayloadError::Incomplete(_) => {
|
aweb::error::PayloadError::Incomplete(_) => MeilisearchHttpError::Payload(
|
||||||
MeilisearchHttpError::Payload(PayloadError::Payload(ActixPayloadError::IncompleteError))
|
PayloadError::Payload(ActixPayloadError::IncompleteError),
|
||||||
}
|
),
|
||||||
_ => MeilisearchHttpError::Payload(PayloadError::Payload(ActixPayloadError::OtherError(error)))
|
_ => MeilisearchHttpError::Payload(PayloadError::Payload(
|
||||||
|
ActixPayloadError::OtherError(error),
|
||||||
|
)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -112,7 +114,7 @@ pub enum ActixPayloadError {
|
|||||||
#[error("The provided payload is incomplete and cannot be decompressed")]
|
#[error("The provided payload is incomplete and cannot be decompressed")]
|
||||||
IncompleteError,
|
IncompleteError,
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
OtherError(aweb::error::PayloadError)
|
OtherError(aweb::error::PayloadError),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
@ -143,7 +145,7 @@ impl ErrorCode for PayloadError {
|
|||||||
aweb::error::PayloadError::Http2Payload(_) => Code::Internal,
|
aweb::error::PayloadError::Http2Payload(_) => Code::Internal,
|
||||||
aweb::error::PayloadError::Io(_) => Code::Internal,
|
aweb::error::PayloadError::Io(_) => Code::Internal,
|
||||||
_ => todo!(),
|
_ => todo!(),
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
PayloadError::Json(err) => match err {
|
PayloadError::Json(err) => match err {
|
||||||
JsonPayloadError::Overflow { .. } => Code::PayloadTooLarge,
|
JsonPayloadError::Overflow { .. } => Code::PayloadTooLarge,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user