guard unsafe code behind separate module to satisfy clippy

This commit is contained in:
realaravinth 2021-12-16 14:51:06 +05:30
parent 005d69d80f
commit 83448fd0fb
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88

View file

@ -14,8 +14,6 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
#![allow(clippy::not_unsafe_ptr_arg_deref)]
use lazy_static::lazy_static; use lazy_static::lazy_static;
use redis_module::NotifyEvent; use redis_module::NotifyEvent;
use redis_module::{redis_command, redis_event_handler, redis_module}; use redis_module::{redis_command, redis_event_handler, redis_module};
@ -80,7 +78,11 @@ pub fn on_delete(ctx: &Context, event_type: NotifyEvent, event: &str, key_name:
} }
} }
redis_module! { #[allow(clippy::not_unsafe_ptr_arg_deref)]
pub mod redis {
use super::*;
redis_module! {
name: "mcaptcha_cahce", name: "mcaptcha_cahce",
version: PKG_VERSION, version: PKG_VERSION,
data_types: [MCAPTCHA_BUCKET_TYPE, MCAPTCHA_MCAPTCHA_TYPE, MCAPTCHA_SAFETY_TYPE, MCAPTCHA_CHALLENGE_TYPE], data_types: [MCAPTCHA_BUCKET_TYPE, MCAPTCHA_MCAPTCHA_TYPE, MCAPTCHA_SAFETY_TYPE, MCAPTCHA_CHALLENGE_TYPE],
@ -98,4 +100,5 @@ redis_module! {
event_handlers: [ event_handlers: [
[@EXPIRED @EVICTED: on_delete], [@EXPIRED @EVICTED: on_delete],
] ]
}
} }