diff options
| author | Fuwn <[email protected]> | 2022-04-27 01:17:32 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-04-27 01:17:32 -0700 |
| commit | c81eab0c3b4fa8d8433505bd3d061f8de8e87d74 (patch) | |
| tree | 09451b5ebec415295d63504e9eaffecb37277a68 /src/main.rs | |
| parent | refactor(modules): move search out of module (diff) | |
| download | locus-c81eab0c3b4fa8d8433505bd3d061f8de8e87d74.tar.xz locus-c81eab0c3b4fa8d8433505bd3d061f8de8e87d74.zip | |
refactor: restrict more
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 15 |
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() { |