aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index b3820d5..a1beda9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -46,6 +46,10 @@ use windmark::{Response, Router};
use yarte::Template;
const SEARCH_SIZE: usize = 10;
+const ERROR_HANDLER_RESPONSE: &str =
+ "The requested resource could not be found at this time. You can try \
+ refreshing the page, if that doesn't change anything; contact Fuwn! \
static DATABASE: SyncLazy<Mutex<PickleDb>> = SyncLazy::new(|| {
Mutex::new({
@@ -130,12 +134,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.unwrap();
}));
router.set_error_handler(Box::new(|_| {
- Response::NotFound(
- "The requested resource could not be found at this time. You can try \
- refreshing the page, if that doesn't change anything; contact Fuwn! \
- .into(),
- )
+ Response::NotFound(ERROR_HANDLER_RESPONSE.into())
}));
router.set_fix_path(true);