aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-04-27 01:17:32 -0700
committerFuwn <[email protected]>2022-04-27 01:17:32 -0700
commitc81eab0c3b4fa8d8433505bd3d061f8de8e87d74 (patch)
tree09451b5ebec415295d63504e9eaffecb37277a68 /src/main.rs
parentrefactor(modules): move search out of module (diff)
downloadlocus-c81eab0c3b4fa8d8433505bd3d061f8de8e87d74.tar.xz
locus-c81eab0c3b4fa8d8433505bd3d061f8de8e87d74.zip
refactor: restrict more
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/main.rs b/src/main.rs
index 0f9dd55..dcefb64 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -36,12 +36,11 @@ mod route;
#[macro_use]
extern crate log;
-use std::{collections::HashMap, lazy::SyncLazy, sync::Mutex};
+use std::{lazy::SyncLazy, sync::Mutex};
use pickledb::PickleDb;
use tokio::time::Instant;
-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! \
@@ -63,18 +62,6 @@ static DATABASE: SyncLazy<Mutex<PickleDb>> = SyncLazy::new(|| {
}
})
});
-static ROUTES: SyncLazy<Mutex<HashMap<String, route::Route>>> =
- SyncLazy::new(|| Mutex::new(HashMap::new()));
-
-#[derive(yarte::Template)]
-#[template(path = "main")]
-struct Main<'a> {
- body: &'a str,
- hits: &'a i32,
- quote: &'a str,
- commit: &'a str,
- mini_commit: &'a str,
-}
fn time_mounts<T>(context: &str, timer: &mut Instant, mut mounter: T)
where T: FnMut() {