Skip to content

Commit

Permalink
fix: Use AtomicI32 instead of I64 for compatibility with armel (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Feb 12, 2024
1 parent d0d8f26 commit 98049f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
mod utils {

use std::sync::atomic::{AtomicI64, Ordering};
use std::sync::atomic::{AtomicI32, Ordering};

use once_cell::sync::Lazy;

// WARNING Expecting that `cargo test` won't be invoked on the same computer more than once within
// a single millisecond
static INSTANCE_ID: Lazy<i64> = Lazy::new(|| chrono::Local::now().timestamp_millis());
static ID_OFFSET: AtomicI64 = AtomicI64::new(0);
static ID_OFFSET: AtomicI32 = AtomicI32::new(0);

pub fn get_unique_name() -> String {
let id = ID_OFFSET.fetch_add(1, Ordering::SeqCst);
Expand Down

0 comments on commit 98049f1

Please sign in to comment.