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

Commit db6b85e

Browse files
authored
Merge pull request #461 from EPashkin/atomic_usize_new
Don't use deprecated ATOMIC_USIZE_INIT
2 parents f789f54 + 644fcd6 commit db6b85e

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
@@ -226,9 +226,9 @@ pub use source_futures::*;
226226
// This works around it by using our own counter for threads.
227227
//
228228
// Taken from the fragile crate
229-
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
229+
use std::sync::atomic::{AtomicUsize, Ordering};
230230
fn next_thread_id() -> usize {
231-
static mut COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
231+
static mut COUNTER: AtomicUsize = AtomicUsize::new(0);
232232
unsafe { COUNTER.fetch_add(1, Ordering::SeqCst) }
233233
}
234234

0 commit comments

Comments
 (0)