From de8f908bba1059ae8c0ef240e3c69b652a30f2b1 Mon Sep 17 00:00:00 2001 From: Guy Korland Date: Tue, 30 Aug 2022 14:37:49 +0300 Subject: [PATCH 1/2] add support for unlink --- src/key.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/key.rs b/src/key.rs index 3ccb97bc..5c43c863 100644 --- a/src/key.rs +++ b/src/key.rs @@ -269,6 +269,14 @@ impl RedisKeyWritable { REDIS_OK } + /// # Panics + /// + /// Will panic if `RedisModule_UnlinkKey` is missing in redismodule.h + pub fn unlink(&self) -> RedisResult { + unsafe { raw::RedisModule_UnlinkKey.unwrap()(self.key_inner) }; + REDIS_OK + } + /// # Panics /// /// Will panic if `RedisModule_KeyType` is missing in redismodule.h From 767ce38e334cdaf2e845495be06790653cc6e00d Mon Sep 17 00:00:00 2001 From: Guy Korland Date: Tue, 30 Aug 2022 14:58:38 +0300 Subject: [PATCH 2/2] fix format --- src/key.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/key.rs b/src/key.rs index 5c43c863..ef18f9a9 100644 --- a/src/key.rs +++ b/src/key.rs @@ -275,7 +275,7 @@ impl RedisKeyWritable { pub fn unlink(&self) -> RedisResult { unsafe { raw::RedisModule_UnlinkKey.unwrap()(self.key_inner) }; REDIS_OK - } + } /// # Panics ///