Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 7070570

Browse files
committed
Auto merge of #1297 - Xanewok:prefer-new, r=Xanewok
Prefer {AtomicUsize,Once}::new Since the `ATOMIC_USIZE_INIT` is deprecated (figured `ONCE_INIT` is likely to follow?).
2 parents b52361a + 1544ffc commit 7070570

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/support/paths.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ use std::env;
55
use std::fs;
66
use std::io::{self, ErrorKind};
77
use std::path::{Path, PathBuf};
8-
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
9-
use std::sync::{Once, ONCE_INIT};
8+
use std::sync::atomic::{AtomicUsize, Ordering};
9+
use std::sync::Once;
1010

1111
static RLS_INTEGRATION_TEST_DIR: &'static str = "rlsit";
12-
static NEXT_ID: AtomicUsize = ATOMIC_USIZE_INIT;
12+
static NEXT_ID: AtomicUsize = AtomicUsize::new(0);
1313

1414
thread_local!(static TASK_ID: usize = NEXT_ID.fetch_add(1, Ordering::SeqCst));
1515

1616
fn init() {
17-
static GLOBAL_INIT: Once = ONCE_INIT;
17+
static GLOBAL_INIT: Once = Once::new();
1818
thread_local!(static LOCAL_INIT: Cell<bool> = Cell::new(false));
1919
GLOBAL_INIT.call_once(|| {
2020
global_root().mkdir_p();

0 commit comments

Comments
 (0)