From c845ef0a19b5dfe1ece99f39b3f7b7b909367b33 Mon Sep 17 00:00:00 2001 From: Lee Smet Date: Tue, 20 Jan 2026 11:35:30 +0100 Subject: [PATCH] Add conditional complation for unused methods Signed-off-by: Lee Smet --- mycelium/src/packet_queue.rs | 2 ++ mycelium/src/router.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/mycelium/src/packet_queue.rs b/mycelium/src/packet_queue.rs index 76971f1..b7fa76f 100644 --- a/mycelium/src/packet_queue.rs +++ b/mycelium/src/packet_queue.rs @@ -229,6 +229,7 @@ impl PacketQueue { } /// Check if there are any packets queued for the given subnet. + #[cfg(test)] pub fn has_packets(&self, subnet: &Subnet) -> bool { self.queue .get(subnet) @@ -237,6 +238,7 @@ impl PacketQueue { } /// Get the total number of packets currently queued. + #[cfg(test)] pub fn total_count(&self) -> usize { self.total_count.load(Ordering::Relaxed) } diff --git a/mycelium/src/router.rs b/mycelium/src/router.rs index ebd3c78..32db02a 100644 --- a/mycelium/src/router.rs +++ b/mycelium/src/router.rs @@ -128,6 +128,7 @@ where /// Returns the Router and two receivers: /// - `pending_packet_rx`: unencrypted packets that were queued and are now ready to be processed /// - `timeout_packet_rx`: unencrypted packets that timed out waiting for route discovery (for ICMP generation) + #[allow(clippy::type_complexity)] pub fn new( update_workers: usize, node_tun: UnboundedSender,