summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2024-02-11 21:17:58 +0100
committerFxQnLr <[email protected]>2024-02-11 21:17:58 +0100
commite4832b4cf36ba0eaed298ee458498eddd7176590 (patch)
tree98cb6e1e1d97f69be4f8379edc8c33f6eda4e621 /src/error.rs
parent6f94a825485b1d622d8ebe88ddf3e2f426d1c69c (diff)
downloadwebol-e4832b4cf36ba0eaed298ee458498eddd7176590.tar
webol-e4832b4cf36ba0eaed298ee458498eddd7176590.tar.gz
webol-e4832b4cf36ba0eaed298ee458498eddd7176590.zip
fix clippy
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/error.rs b/src/error.rs
index 5b82534..56d6c52 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -4,10 +4,10 @@ use axum::Json;
4use axum::response::{IntoResponse, Response}; 4use axum::response::{IntoResponse, Response};
5use serde_json::json; 5use serde_json::json;
6use tracing::error; 6use tracing::error;
7use crate::auth::AuthError; 7use crate::auth::Error as AuthError;
8 8
9#[derive(Debug)] 9#[derive(Debug)]
10pub enum WebolError { 10pub enum Error {
11 Generic, 11 Generic,
12 Auth(AuthError), 12 Auth(AuthError),
13 DB(sqlx::Error), 13 DB(sqlx::Error),
@@ -16,7 +16,7 @@ pub enum WebolError {
16 Broadcast(io::Error), 16 Broadcast(io::Error),
17} 17}
18 18
19impl IntoResponse for WebolError { 19impl IntoResponse for Error {
20 fn into_response(self) -> Response { 20 fn into_response(self) -> Response {
21 let (status, error_message) = match self { 21 let (status, error_message) = match self {
22 Self::Auth(err) => { 22 Self::Auth(err) => {
@@ -45,4 +45,4 @@ impl IntoResponse for WebolError {
45 })); 45 }));
46 (status, body).into_response() 46 (status, body).into_response()
47 } 47 }
48} \ No newline at end of file 48}