aboutsummaryrefslogtreecommitdiff
path: root/src/errors.rs
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-06-28 09:42:00 -0400
committerCara Salter <cara@devcara.com>2022-06-28 09:42:00 -0400
commita739b00bc366758be9c452979cc4b4c831dd8a75 (patch)
tree99d068468127c8f185da4eb9c0056a991c37c3c7 /src/errors.rs
parent2dea604581cafbfbb73443ec2449cda391d12ab7 (diff)
downloadsolard-a739b00bc366758be9c452979cc4b4c831dd8a75.tar.gz
solard-a739b00bc366758be9c452979cc4b4c831dd8a75.zip
tool: FMT
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/errors.rs b/src/errors.rs
index f6e00e2..e32c6d5 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -2,9 +2,9 @@ use hex::FromHexError;
use ring::error::KeyRejected;
use thiserror::Error;
-use axum::response::{Response, IntoResponse};
-use axum::http::StatusCode;
use axum::body;
+use axum::http::StatusCode;
+use axum::response::{IntoResponse, Response};
use axum::Json;
use ring::error::Unspecified as RingUnspecified;
@@ -56,7 +56,6 @@ pub type NoneResult = std::result::Result<(), ServiceError>;
impl IntoResponse for ServiceError {
fn into_response(self) -> Response {
-
let body = body::boxed(body::Full::from(self.to_string()));
let status = match self {
@@ -64,9 +63,6 @@ impl IntoResponse for ServiceError {
ServiceError::NotAuthorized => StatusCode::UNAUTHORIZED,
_ => StatusCode::INTERNAL_SERVER_ERROR,
};
- Response::builder()
- .status(status)
- .body(body)
- .unwrap()
+ Response::builder().status(status).body(body).unwrap()
}
}