its not that easy..
This commit is contained in:
parent
b5d3b47056
commit
328a060e9c
@ -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 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user