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}; use core::sync::atomic::{AtomicU16, Ordering};
pub struct SeqCountProviderAtomicRef { pub struct SeqCountProviderAtomicRef {
atomic: &'static AtomicU16, atomic: AtomicU16,
ordering: Ordering, ordering: Ordering,
} }
impl SeqCountProviderAtomicRef { impl SeqCountProviderAtomicRef {
pub const fn new(atomic: &'static AtomicU16, ordering: Ordering) -> Self { pub const fn new(ordering: Ordering) -> Self {
Self { atomic, ordering } Self { atomic: AtomicU16::new(0), ordering }
} }
} }