Skip to content

Commit 1b7103b

Browse files
committed
Remove unnecessary unsafe
1 parent 7a7bd38 commit 1b7103b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/globals.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -329,18 +329,18 @@ lazy_static! {
329329

330330
// File drivers
331331
lazy_static! {
332-
pub static ref H5FD_CORE: hid_t = unsafe { h5lock!(H5FD_core_init()) };
333-
pub static ref H5FD_SEC2: hid_t = unsafe { h5lock!(H5FD_sec2_init()) };
334-
pub static ref H5FD_STDIO: hid_t = unsafe { h5lock!(H5FD_stdio_init()) };
335-
pub static ref H5FD_FAMILY: hid_t = unsafe { h5lock!(H5FD_family_init()) };
336-
pub static ref H5FD_LOG: hid_t = unsafe { h5lock!(H5FD_log_init()) };
337-
pub static ref H5FD_MULTI: hid_t = unsafe { h5lock!(H5FD_multi_init()) };
332+
pub static ref H5FD_CORE: hid_t = h5lock!(H5FD_core_init());
333+
pub static ref H5FD_SEC2: hid_t = h5lock!(H5FD_sec2_init());
334+
pub static ref H5FD_STDIO: hid_t = h5lock!(H5FD_stdio_init());
335+
pub static ref H5FD_FAMILY: hid_t = h5lock!(H5FD_family_init());
336+
pub static ref H5FD_LOG: hid_t = h5lock!(H5FD_log_init());
337+
pub static ref H5FD_MULTI: hid_t = h5lock!(H5FD_multi_init());
338338
}
339339

340340
// MPI-IO file driver
341341
#[cfg(feature = "have-parallel")]
342342
lazy_static! {
343-
pub static ref H5FD_MPIO: hid_t = unsafe { h5lock!(H5FD_mpio_init()) };
343+
pub static ref H5FD_MPIO: hid_t = h5lock!(H5FD_mpio_init());
344344
}
345345
#[cfg(not(feature = "have-parallel"))]
346346
lazy_static! {
@@ -350,7 +350,7 @@ lazy_static! {
350350
// Direct VFD
351351
#[cfg(feature = "have-direct")]
352352
lazy_static! {
353-
pub static ref H5FD_DIRECT: hid_t = unsafe { h5lock!(H5FD_direct_init()) };
353+
pub static ref H5FD_DIRECT: hid_t = h5lock!(H5FD_direct_init());
354354
}
355355
#[cfg(not(feature = "have-direct"))]
356356
lazy_static! {

0 commit comments

Comments
 (0)