Skip to content

Commit

Permalink
refactor: Use AtomicUSize instead of AtomicU64 in TagGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
duesee committed Nov 18, 2024
1 parent e0cd676 commit df31210
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions imap-types/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
//! ```
#[cfg(feature = "tag_generator")]
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::{
borrow::Cow,
fmt::{Debug, Display, Formatter},
Expand All @@ -57,7 +57,7 @@ use crate::utils::indicators::{
};

#[cfg(feature = "tag_generator")]
static GLOBAL_TAG_GENERATOR_COUNT: AtomicU64 = AtomicU64::new(0);
static GLOBAL_TAG_GENERATOR_COUNT: AtomicUsize = AtomicUsize::new(0);

macro_rules! impl_try_from {
($via:ty, $lifetime:lifetime, $from:ty, $target:ty) => {
Expand Down Expand Up @@ -1142,7 +1142,7 @@ impl<'a> AsRef<str> for Tag<'a> {
#[cfg_attr(docsrs, doc(cfg(feature = "tag_generator")))]
#[derive(Debug)]
pub struct TagGenerator {
global: u64,
global: usize,
counter: u64,
}

Expand Down

0 comments on commit df31210

Please sign in to comment.