clippy work
This commit is contained in:
@@ -61,7 +61,7 @@ pub const PUBLIC_ADDRESS_CHECK_TASK_INTERVAL_SECS: u32 = 60;
|
||||
pub const PUBLIC_ADDRESS_INCONSISTENCY_TIMEOUT_US: TimestampDuration =
|
||||
TimestampDuration::new(300_000_000u64); // 5 minutes
|
||||
pub const PUBLIC_ADDRESS_INCONSISTENCY_PUNISHMENT_TIMEOUT_US: TimestampDuration =
|
||||
TimestampDuration::new(3600_000_000u64); // 60 minutes
|
||||
TimestampDuration::new(3_600_000_000_u64); // 60 minutes
|
||||
pub const ADDRESS_FILTER_TASK_INTERVAL_SECS: u32 = 60;
|
||||
pub const BOOT_MAGIC: &[u8; 4] = b"BOOT";
|
||||
|
||||
@@ -261,7 +261,7 @@ impl NetworkManager {
|
||||
where
|
||||
F: FnOnce(&VeilidConfigInner) -> R,
|
||||
{
|
||||
f(&*self.unlocked_inner.config.get())
|
||||
f(&self.unlocked_inner.config.get())
|
||||
}
|
||||
pub fn storage_manager(&self) -> StorageManager {
|
||||
self.unlocked_inner.storage_manager.clone()
|
||||
@@ -892,7 +892,7 @@ impl NetworkManager {
|
||||
data.len(),
|
||||
connection_descriptor
|
||||
);
|
||||
let remote_addr = connection_descriptor.remote_address().to_ip_addr();
|
||||
let remote_addr = connection_descriptor.remote_address().ip_addr();
|
||||
|
||||
// Network accounting
|
||||
self.stats_packet_rcvd(remote_addr, ByteCount::new(data.len() as u64));
|
||||
@@ -900,7 +900,7 @@ impl NetworkManager {
|
||||
// If this is a zero length packet, just drop it, because these are used for hole punching
|
||||
// and possibly other low-level network connectivity tasks and will never require
|
||||
// more processing or forwarding
|
||||
if data.len() == 0 {
|
||||
if data.is_empty() {
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user