mirror of
https://github.com/threefoldtech/mycelium.git
synced 2026-05-25 18:04:11 +00:00
Add conditional complation for unused methods
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user