From c73af07b9a570968ebc9680dd5d7385e051f0dee Mon Sep 17 00:00:00 2001 From: Simon Bihel Date: Mon, 17 Apr 2023 13:02:01 +0100 Subject: [PATCH] Fix Clippy --- src/worker_lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/worker_lib.rs b/src/worker_lib.rs index b0b593b..24a49c0 100644 --- a/src/worker_lib.rs +++ b/src/worker_lib.rs @@ -31,15 +31,15 @@ macro_rules! json_bad_request { impl From for Result { fn from(error: CustomError) -> Self { match error { - CustomError::BadRequest(_) => Response::error(&error.to_string(), 400), + CustomError::BadRequest(_) => Response::error(error.to_string(), 400), CustomError::BadRequestRegister(e) => { Response::from_json(&e).map(|r| r.with_status(400)) } CustomError::BadRequestToken(e) => Response::from_json(&e).map(|r| r.with_status(400)), - CustomError::Unauthorized(_) => Response::error(&error.to_string(), 401), - CustomError::NotFound => Response::error(&error.to_string(), 404), + CustomError::Unauthorized(_) => Response::error(error.to_string(), 401), + CustomError::NotFound => Response::error(error.to_string(), 404), CustomError::Redirect(uri) => Response::redirect(uri.parse().unwrap()), - CustomError::Other(_) => Response::error(&error.to_string(), 500), + CustomError::Other(_) => Response::error(error.to_string(), 500), } } }