Skip to content

Commit 31a002a

Browse files
committed
Fix a deprecation warning
1 parent 0a23f48 commit 31a002a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ impl Drop for Bomb {
114114
mod lock {
115115
use std::boxed::Box;
116116
use std::cell::Cell;
117-
use std::sync::{Mutex, MutexGuard, Once, ONCE_INIT};
117+
use std::sync::{Mutex, MutexGuard, Once};
118118

119119
pub struct LockGuard(Option<MutexGuard<'static, ()>>);
120120

121121
static mut LOCK: *mut Mutex<()> = 0 as *mut _;
122-
static INIT: Once = ONCE_INIT;
122+
static INIT: Once = Once::new();
123123
thread_local!(static LOCK_HELD: Cell<bool> = Cell::new(false));
124124

125125
impl Drop for LockGuard {

0 commit comments

Comments
 (0)