aboutsummaryrefslogtreecommitdiffstats
path: root/src/wireguard/router
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/wireguard/router/device.rs1
-rw-r--r--src/wireguard/router/tests/bench.rs4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/wireguard/router/device.rs b/src/wireguard/router/device.rs
index 54e5149..eeae621 100644
--- a/src/wireguard/router/device.rs
+++ b/src/wireguard/router/device.rs
@@ -30,6 +30,7 @@ pub struct DeviceInner<E: Endpoint, C: Callbacks, T: tun::Writer, B: udp::Writer
pub(super) outbound: RwLock<(bool, Option<B>)>,
// routing
+ #[allow(clippy::type_complexity)]
pub(super) recv: RwLock<HashMap<u32, Arc<DecryptionState<E, C, T, B>>>>, /* receiver id -> decryption state */
pub(super) table: RoutingTable<Peer<E, C, T, B>>,
diff --git a/src/wireguard/router/tests/bench.rs b/src/wireguard/router/tests/bench.rs
index 948a156..c2334b3 100644
--- a/src/wireguard/router/tests/bench.rs
+++ b/src/wireguard/router/tests/bench.rs
@@ -25,6 +25,7 @@ struct TransmissionCounter {
}
impl TransmissionCounter {
+ #[allow(dead_code)]
fn new() -> TransmissionCounter {
TransmissionCounter {
sent: AtomicUsize::new(0),
@@ -32,15 +33,18 @@ impl TransmissionCounter {
}
}
+ #[allow(dead_code)]
fn reset(&self) {
self.sent.store(0, Ordering::SeqCst);
self.recv.store(0, Ordering::SeqCst);
}
+ #[allow(dead_code)]
fn sent(&self) -> usize {
self.sent.load(Ordering::Acquire)
}
+ #[allow(dead_code)]
fn recv(&self) -> usize {
self.recv.load(Ordering::Acquire)
}