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,