mirror of
https://github.com/mCaptcha/cache.git
synced 2024-11-21 16:25:19 +03:00
guard unsafe code behind separate module to satisfy clippy
This commit is contained in:
parent
005d69d80f
commit
83448fd0fb
1 changed files with 23 additions and 20 deletions
|
@ -14,8 +14,6 @@
|
|||
* 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/>.
|
||||
*/
|
||||
#![allow(clippy::not_unsafe_ptr_arg_deref)]
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use redis_module::NotifyEvent;
|
||||
use redis_module::{redis_command, redis_event_handler, redis_module};
|
||||
|
@ -80,6 +78,10 @@ pub fn on_delete(ctx: &Context, event_type: NotifyEvent, event: &str, key_name:
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::not_unsafe_ptr_arg_deref)]
|
||||
pub mod redis {
|
||||
use super::*;
|
||||
|
||||
redis_module! {
|
||||
name: "mcaptcha_cahce",
|
||||
version: PKG_VERSION,
|
||||
|
@ -99,3 +101,4 @@ redis_module! {
|
|||
[@EXPIRED @EVICTED: on_delete],
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue