its not that easy..

This commit is contained in:
Robin Müller 2023-01-03 16:54:01 +01:00
parent b5d3b47056
commit 328a060e9c
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -45,13 +45,13 @@ impl SequenceCountProviderCore<u16> for SeqCountProviderSimple {
use core::sync::atomic::{AtomicU16, Ordering};
pub struct SeqCountProviderAtomicRef {
atomic: &'static AtomicU16,
atomic: AtomicU16,
ordering: Ordering,
}
impl SeqCountProviderAtomicRef {
pub const fn new(atomic: &'static AtomicU16, ordering: Ordering) -> Self {
Self { atomic, ordering }
pub const fn new(ordering: Ordering) -> Self {
Self { atomic: AtomicU16::new(0), ordering }
}
}