aboutsummaryrefslogtreecommitdiff
path: root/cache
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-04-30 10:47:54 +0200
committermetamuffin <metamuffin@disroot.org>2025-04-30 10:47:54 +0200
commita2ef3f6ec4c830611fde1a2e935588ccbbc61c03 (patch)
treeddcc1cb501e6c7237edd491aa7136d02150d03d3 /cache
parent212a0f23bc894faf88e159560c113f504349cc05 (diff)
downloadjellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar
jellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar.bz2
jellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar.zst
config works
Diffstat (limited to 'cache')
-rw-r--r--cache/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/cache/src/lib.rs b/cache/src/lib.rs
index 2d2cfa3..2d31d6c 100644
--- a/cache/src/lib.rs
+++ b/cache/src/lib.rs
@@ -35,13 +35,14 @@ pub struct Config {
max_in_memory_cache_size: usize,
}
+pub static CONF_PRELOAD: std::sync::Mutex<Option<Config>> = std::sync::Mutex::new(None);
static CONF: LazyLock<Config> = LazyLock::new(|| {
CONF_PRELOAD
- .blocking_lock()
+ .lock()
+ .unwrap()
.take()
.expect("cache config not preloaded. logic error")
});
-static CONF_PRELOAD: Mutex<Option<Config>> = Mutex::const_new(None);
#[derive(Debug, Encode, Decode, Serialize, Clone)]
pub struct CachePath(pub PathBuf);