Skip to content

Commit de7f24f

Browse files
committed
Remove an unnecessary use of lazy_static
1 parent b6cdc9d commit de7f24f

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ version = "1.0"
2727
default-features = false
2828

2929
[dev-dependencies]
30-
lazy_static = "1"
3130
rand = "0.8"
3231
rand_xorshift = "0.3"

ci/compat-Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/sort-panic-safe.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ use std::sync::atomic::AtomicUsize;
88
use std::sync::atomic::Ordering::Relaxed;
99
use std::thread;
1010

11-
static VERSIONS: AtomicUsize = AtomicUsize::new(0);
11+
const ZERO: AtomicUsize = AtomicUsize::new(0);
12+
const LEN: usize = 20_000;
1213

13-
lazy_static::lazy_static! {
14-
static ref DROP_COUNTS: Vec<AtomicUsize> = (0..20_000).map(|_| AtomicUsize::new(0)).collect();
15-
}
14+
static VERSIONS: AtomicUsize = ZERO;
15+
16+
static DROP_COUNTS: [AtomicUsize; LEN] = [ZERO; LEN];
1617

1718
#[derive(Clone, Eq)]
1819
struct DropCounter {

0 commit comments

Comments
 (0)