summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-09-25 01:27:05 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-09-25 02:16:04 -0400
commit452c8d0d9edb9894c108b6d577806c7c9d0071dd (patch)
tree1857a7409fe9e5e8c724ff7a04112c57ed3de92c /src/error.rs
parent697e90f291cec1bbd89965c2731f9481ec4507c4 (diff)
Crank up the Clippy warnings.
This'll catch style issues, mostly.
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 ffc90e9..6e797b4 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -16,9 +16,9 @@ type BoxedError = Box<dyn error::Error + Send + Sync>;
// 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<E> From<E> for InternalError
+impl<E> From<E> for Internal
where
E: Into<BoxedError>,
{
@@ -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()
}