diff options
| author | Fuwn <[email protected]> | 2022-08-27 22:29:06 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-08-27 22:29:06 -0700 |
| commit | 83fc1aab2e15f60b6e7b85e7831d6591b4d1ab36 (patch) | |
| tree | 43ddb3f37117e61b1caa619b72c96eafa21cf63b /src/main.rs | |
| parent | fix(main.rs): enable feature for actions (diff) | |
| download | locus-83fc1aab2e15f60b6e7b85e7831d6591b4d1ab36.tar.xz locus-83fc1aab2e15f60b6e7b85e7831d6591b4d1ab36.zip | |
feat: bump toolchain to nightly-2022-08-23
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 4ba8f83..38109cf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,7 +16,7 @@ // Copyright (C) 2022-2022 Fuwn <[email protected]> // SPDX-License-Identifier: GPL-3.0-only -#![feature(array_from_fn, const_extern_fn, is_some_with, once_cell)] +#![feature(const_extern_fn, is_some_with, once_cell)] #![deny( warnings, nonstandard_style, @@ -37,8 +37,9 @@ mod xml; #[macro_use] extern crate log; -use std::{lazy::SyncLazy, sync::Mutex}; +use std::sync::Mutex; +use once_cell::sync::Lazy; use pickledb::PickleDb; use tokio::time::Instant; @@ -47,7 +48,7 @@ const ERROR_HANDLER_RESPONSE: &str = refreshing the page, if that doesn't change anything; contact Fuwn! \ -static DATABASE: SyncLazy<Mutex<PickleDb>> = SyncLazy::new(|| { +static DATABASE: Lazy<Mutex<PickleDb>> = Lazy::new(|| { Mutex::new({ if std::fs::File::open(".locus/locus.db").is_ok() { PickleDb::load_json( |