From d7848fcb6f92aa997ddeb452531bf41121efb382 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sat, 6 Jan 2024 16:12:39 +0300 Subject: [PATCH] Flatten errors module --- .gitignore | 2 -- src/errors/{not_found/not-found.css => cube-grid.css} | 0 .../{internal_server_error/mod.rs => internal_server_error.rs} | 2 +- src/errors/{not_found/mod.rs => not_found.rs} | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) rename src/errors/{not_found/not-found.css => cube-grid.css} (100%) rename src/errors/{internal_server_error/mod.rs => internal_server_error.rs} (94%) rename src/errors/{not_found/mod.rs => not_found.rs} (95%) diff --git a/.gitignore b/.gitignore index 9b76d58..8a62fd3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,6 @@ !src/ !src/errors/ -!src/errors/internal_server_error/ -!src/errors/not_found/ !src/page/ !src/page/cube/ !src/page/text/ diff --git a/src/errors/not_found/not-found.css b/src/errors/cube-grid.css similarity index 100% rename from src/errors/not_found/not-found.css rename to src/errors/cube-grid.css diff --git a/src/errors/internal_server_error/mod.rs b/src/errors/internal_server_error.rs similarity index 94% rename from src/errors/internal_server_error/mod.rs rename to src/errors/internal_server_error.rs index b6a7ecb..c9298ce 100644 --- a/src/errors/internal_server_error/mod.rs +++ b/src/errors/internal_server_error.rs @@ -19,7 +19,7 @@ pub fn handler( let response = response.set_body( cube::create( Some("Error"), - asset::Css::Shared("not-found.css"), + asset::Css::Shared("cube-grid.css"), array::from_fn(|_| { (html! { .frame { "error" } diff --git a/src/errors/not_found/mod.rs b/src/errors/not_found.rs similarity index 95% rename from src/errors/not_found/mod.rs rename to src/errors/not_found.rs index f39817e..e323c16 100644 --- a/src/errors/not_found/mod.rs +++ b/src/errors/not_found.rs @@ -19,7 +19,7 @@ pub fn handler( let response = response.set_body( cube::create( Some("404"), - asset::Css::Shared("not-found.css"), + asset::Css::Shared("cube-grid.css"), array::from_fn(|_| { (html! { .frame {