diff options
author | Vika <vika@fireburn.ru> | 2023-06-15 22:45:28 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2023-06-15 22:45:28 +0300 |
commit | 775693f36d96c304ff1cb76e0dea78d61d82903e (patch) | |
tree | 2bed2d4a87723b8c81e5b2a2bbf0aff39aab7567 /kittybox-rs/src/database | |
parent | 2f5df555ecf70dbaf7f059723813ea099e12879d (diff) | |
download | kittybox-775693f36d96c304ff1cb76e0dea78d61d82903e.tar.zst |
Notes on how to replace lazy_static! with a LazyCell
should've been a LazyLock tho
Diffstat (limited to 'kittybox-rs/src/database')
-rw-r--r-- | kittybox-rs/src/database/redis/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kittybox-rs/src/database/redis/mod.rs b/kittybox-rs/src/database/redis/mod.rs index eeaa3f2..39ee852 100644 --- a/kittybox-rs/src/database/redis/mod.rs +++ b/kittybox-rs/src/database/redis/mod.rs @@ -44,6 +44,12 @@ lazy_static! { edit_post: redis::Script::new(include_str!("./edit_post.lua")) }; } +/*#[cfg(feature(lazy_cell))] +static SCRIPTS_CELL: std::cell::LazyCell<RedisScripts> = std::cell::LazyCell::new(|| { + RedisScripts { + edit_post: redis::Script::new(include_str!("./edit_post.lua")) + } +});*/ #[derive(Clone)] pub struct RedisStorage { |