diff --git a/src/app/mod.rs b/src/app/mod.rs index e335b94..bd3d9c0 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -19,10 +19,8 @@ pub fn routes() -> Router> { #[derive(Template)] #[template(path = "index.html")] -struct IndexTemplate<'a> { - title: &'a str, -} +struct IndexTemplate {} -async fn root<'a>() -> IndexTemplate<'a> { - IndexTemplate { title: "Locality" } +async fn root() -> IndexTemplate { + IndexTemplate {} } diff --git a/src/error.rs b/src/error.rs index 1cfeeb0..4578195 100644 --- a/src/error.rs +++ b/src/error.rs @@ -130,20 +130,14 @@ impl std::error::Error for Error { #[derive(Template)] #[template(path = "error.html")] -struct ErrorTemplate<'a> { - title: &'a str, -} +struct ErrorTemplate {} impl IntoResponse for Error { fn into_response(self) -> Response { match self.error_type { ErrorType::InternalServerError => { error!(inner = self.inner, "Uncaught error producing HTTP 500."); - ( - StatusCode::INTERNAL_SERVER_ERROR, - ErrorTemplate { title: "Error" }, - ) - .into_response() + (StatusCode::INTERNAL_SERVER_ERROR, ErrorTemplate {}).into_response() } ErrorType::Unauthorized => { (StatusCode::UNAUTHORIZED, "User not authorized.").into_response() diff --git a/templates/base.html b/templates/base.html index 6d169d8..31a63d3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,7 +3,7 @@ - {% block title %}{{title}} - Locality{% endblock %} + {% block title %}Locality{% endblock %}