diff options
author | Andrew Gallant <jamslam@gmail.com> | 2019-02-09 16:27:25 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2019-02-09 16:27:25 -0500 |
commit | 332ad1840130f8696343c115c8fad2c808da16b5 (patch) | |
tree | 4dc2c78b26508facca339320952fccc7aaad9970 | |
parent | fc3cf41247086f6c622dcce30a0a5cc1ab16015b (diff) |
tests: use const constructor for atomics
We did this in 05411b2b for core ripgrep, but didn't carry it over to
tests.
-rw-r--r-- | tests/util.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/util.rs b/tests/util.rs index 6cfa6fc7..a4bed08d 100644 --- a/tests/util.rs +++ b/tests/util.rs @@ -5,12 +5,12 @@ use std::fs::{self, File}; use std::io::{self, Write}; use std::path::{Path, PathBuf}; use std::process::{self, Command}; -use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering}; +use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread; use std::time::Duration; static TEST_DIR: &'static str = "ripgrep-tests"; -static NEXT_ID: AtomicUsize = ATOMIC_USIZE_INIT; +static NEXT_ID: AtomicUsize = AtomicUsize::new(0); /// Setup an empty work directory and return a command pointing to the ripgrep /// executable whose CWD is set to the work directory. |