From bf3591f593bd6e0a4cb2cf9b77bb5211a1f3891d Mon Sep 17 00:00:00 2001 From: mamoniot Date: Tue, 27 Dec 2022 21:09:39 -0500 Subject: [PATCH] cleared warnings --- zssp/src/counter.rs | 4 ---- zssp/src/tests.rs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/zssp/src/counter.rs b/zssp/src/counter.rs index 8b5c9f789..39ca6923d 100644 --- a/zssp/src/counter.rs +++ b/zssp/src/counter.rs @@ -47,9 +47,6 @@ impl CounterValue { pub fn to_u32(&self) -> u32 { self.0 as u32 } - pub fn get_initial_offer_counter() -> CounterValue { - return CounterValue(1u32); - } } /// Incoming packet deduplication and replay protection window. @@ -65,7 +62,6 @@ impl CounterWindow { Self(std::array::from_fn(|_| AtomicU32::new(u32::MAX))) } pub fn reset_for_initial_offer(&self) { - let o = true; for i in 0..COUNTER_MAX_ALLOWED_OOO { self.0[i].store(0, Ordering::SeqCst) } diff --git a/zssp/src/tests.rs b/zssp/src/tests.rs index 747b86dfb..a72e3ffea 100644 --- a/zssp/src/tests.rs +++ b/zssp/src/tests.rs @@ -233,7 +233,7 @@ mod tests { let mut history = Vec::new(); let w = CounterWindow::new(); - for i in 0..1000000 { + for _i in 0..1000000 { let p = xorshift64(&mut rng) as f32/(u32::MAX as f32 + 1.0); let c; if p < 0.5 {