Skip to content

Commit 7d782b5

Browse files
committed
bindings/rust/build.rs: resolve clippy warnings.
1 parent e40e91c commit 7d782b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bindings/rust/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#![allow(non_upper_case_globals)]
77
#![allow(non_camel_case_types)]
88
#![allow(non_snake_case)]
9+
#![allow(unexpected_cfgs)]
910

1011
extern crate alloc;
1112

@@ -39,12 +40,11 @@ mod mt {
3940

4041
pub fn da_pool() -> ThreadPool {
4142
static INIT: Once = Once::new();
42-
static mut POOL: *const Mutex<ThreadPool> =
43-
0 as *const Mutex<ThreadPool>;
43+
static mut POOL: *const Mutex<ThreadPool> = ptr::null();
4444

4545
INIT.call_once(|| {
4646
let pool = Mutex::new(ThreadPool::default());
47-
unsafe { POOL = transmute(Box::new(pool)) };
47+
unsafe { POOL = transmute::<Box<_>, *const _>(Box::new(pool)) };
4848
});
4949
unsafe { (*POOL).lock().unwrap().clone() }
5050
}

0 commit comments

Comments
 (0)