Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 91fdd36

Browse files
committed
ATOMIC_USIZE_INIT is now deprecated on nightly
1 parent 21c7a3d commit 91fdd36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backtrace.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mod imp {
77
use std::cell::UnsafeCell;
88
use std::env;
99
use std::fmt;
10-
use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
10+
use std::sync::atomic::{AtomicUsize, Ordering};
1111
use std::sync::{Arc, Mutex};
1212

1313
/// Internal representation of a backtrace
@@ -33,7 +33,7 @@ mod imp {
3333
/// in the generated error implementations.
3434
#[doc(hidden)]
3535
pub fn new() -> InternalBacktrace {
36-
static ENABLED: AtomicUsize = ATOMIC_USIZE_INIT;
36+
static ENABLED: AtomicUsize = AtomicUsize::new(0);
3737

3838
match ENABLED.load(Ordering::SeqCst) {
3939
0 => {

0 commit comments

Comments
 (0)