From 452c8d0d9edb9894c108b6d577806c7c9d0071dd Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 25 Sep 2024 01:27:05 -0400 Subject: Crank up the Clippy warnings. This'll catch style issues, mostly. --- src/error.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index ffc90e9..6e797b4 100644 --- a/src/error.rs +++ b/src/error.rs @@ -16,9 +16,9 @@ type BoxedError = Box; // Returns a 500 Internal Server Error to the client. Meant to be used via the // `?` operator; _does not_ return the originating error to the client. #[derive(Debug)] -pub struct InternalError(Id, BoxedError); +pub struct Internal(Id, BoxedError); -impl From for InternalError +impl From for Internal where E: Into, { @@ -28,13 +28,13 @@ where } } -impl IntoResponse for InternalError { +impl IntoResponse for Internal { fn into_response(self) -> Response { let Self(id, error) = self; eprintln!("hi: [{id}] {error}"); ( StatusCode::INTERNAL_SERVER_ERROR, - format!("internal server error\nerror id: {}", id), + format!("internal server error\nerror id: {id}"), ) .into_response() } -- cgit v1.2.3