From 328a060e9c94b0dd5b9bcc1c9acdc5cefbbac0ab Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 3 Jan 2023 16:54:01 +0100 Subject: [PATCH] its not that easy.. --- satrs-core/src/seq_count.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/satrs-core/src/seq_count.rs b/satrs-core/src/seq_count.rs index aa0684e..24c4736 100644 --- a/satrs-core/src/seq_count.rs +++ b/satrs-core/src/seq_count.rs @@ -45,13 +45,13 @@ impl SequenceCountProviderCore 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 } } }