Add conditional complation for unused methods

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet
2026-01-20 11:35:30 +01:00
parent 177e8864f2
commit c845ef0a19
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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)
}
+1
View File
@@ -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<DataPacket>,