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() } }