about summary refs log tree commit diff
path: root/kittybox-rs/src/database/redis
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2023-06-15 22:45:28 +0300
committerVika <vika@fireburn.ru>2023-06-15 22:45:28 +0300
commit775693f36d96c304ff1cb76e0dea78d61d82903e (patch)
tree2bed2d4a87723b8c81e5b2a2bbf0aff39aab7567 /kittybox-rs/src/database/redis
parent2f5df555ecf70dbaf7f059723813ea099e12879d (diff)
downloadkittybox-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/redis')
-rw-r--r--kittybox-rs/src/database/redis/mod.rs6
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 {