diff options
| author | Fuwn <[email protected]> | 2022-04-18 04:17:35 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-04-18 04:17:35 -0700 |
| commit | 78f3a233ca24d4df123f2da35897f3e5eec50fc8 (patch) | |
| tree | 28a5002625a1da57c86bdb6f6980419f0469166e /src/main.rs | |
| parent | feat: cache more dynamic routes (diff) | |
| download | locus-78f3a233ca24d4df123f2da35897f3e5eec50fc8.tar.xz locus-78f3a233ca24d4df123f2da35897f3e5eec50fc8.zip | |
refactor: constify many constants
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index d529f5c..044002e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,7 +46,7 @@ use tokio::time::Instant; use windmark::{Response, Router}; use yarte::Template; -const CACHE_RATE: u64 = 60 * 5; +const SEARCH_SIZE: usize = 10; static DATABASE: SyncLazy<Mutex<PickleDb>> = SyncLazy::new(|| { Mutex::new({ @@ -209,7 +209,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { ) .parse_query(&query.0.to_string()) .unwrap(), - &tantivy::collector::TopDocs::with_limit(10), + &tantivy::collector::TopDocs::with_limit(SEARCH_SIZE), ) .unwrap(); |