From 7d782b5629ac0c4e2395529e0658adf19f293015 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Wed, 3 Jul 2024 20:09:29 +0200 Subject: [PATCH] bindings/rust/build.rs: resolve clippy warnings. --- bindings/rust/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/rust/src/lib.rs b/bindings/rust/src/lib.rs index 0123a67c..04c97722 100644 --- a/bindings/rust/src/lib.rs +++ b/bindings/rust/src/lib.rs @@ -6,6 +6,7 @@ #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] +#![allow(unexpected_cfgs)] extern crate alloc; @@ -39,12 +40,11 @@ mod mt { pub fn da_pool() -> ThreadPool { static INIT: Once = Once::new(); - static mut POOL: *const Mutex = - 0 as *const Mutex; + static mut POOL: *const Mutex = ptr::null(); INIT.call_once(|| { let pool = Mutex::new(ThreadPool::default()); - unsafe { POOL = transmute(Box::new(pool)) }; + unsafe { POOL = transmute::, *const _>(Box::new(pool)) }; }); unsafe { (*POOL).lock().unwrap().clone() } }