From 245a6ec2ef4311472837d64964c5cf2b6fe641a1 Mon Sep 17 00:00:00 2001 From: Ricardo Zuasti Date: Sun, 18 Jan 2026 12:04:13 -0500 Subject: [PATCH] Removed compiler warnings (unused imports) --- src/device_finders/arp.rs | 2 +- src/device_finders/arp/packet_send_receive.rs | 4 ++-- src/main.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/device_finders/arp.rs b/src/device_finders/arp.rs index d319bcd..433cf92 100644 --- a/src/device_finders/arp.rs +++ b/src/device_finders/arp.rs @@ -7,7 +7,7 @@ use pnet::{ datalink::{self, Channel, NetworkInterface}, ipnetwork::IpNetwork, }; -use tokio::time::{Duration, Instant, timeout}; +use tokio::time::{Duration, timeout}; const DEFAULT_SENDER_TIMEOUT: u64 = 60; // 1 minute to send all packets - good for a class C network const DEFAULT_SCAN_DURATION: u64 = 300; // 5 minutes to wait per round to receive responses diff --git a/src/device_finders/arp/packet_send_receive.rs b/src/device_finders/arp/packet_send_receive.rs index 3437370..0a5813b 100644 --- a/src/device_finders/arp/packet_send_receive.rs +++ b/src/device_finders/arp/packet_send_receive.rs @@ -1,5 +1,5 @@ use crate::device_finders::Device; -use log::{debug, info, warn}; +use log::{debug, info}; use pnet::datalink::{DataLinkReceiver, DataLinkSender, NetworkInterface}; use pnet::ipnetwork::Ipv4Network; use pnet::packet::arp::{ArpHardwareTypes, ArpOperations, ArpPacket, MutableArpPacket}; @@ -100,7 +100,7 @@ pub async fn listen_for_packets( sleep(Duration::from_millis(1)).await; } info!( - "ARP receiver run for {} secs", + "ARP receiver ran for {} secs", (Instant::now() - start_time).as_secs() ); diff --git a/src/main.rs b/src/main.rs index 9af82ba..12f295d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -use log::{debug, info}; +use log::info; mod config; mod device_finders;