From 8cc8189820ad8edc3a5111f60201cfd6549e5f90 Mon Sep 17 00:00:00 2001 From: mysticmomba Date: Tue, 6 Oct 2026 16:36:30 -0400 Subject: [PATCH] fix: Removed unused function. --- CHANGELOG.md | 5 +++++ src-tauri/src/net/dns.rs | 30 ------------------------------ 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1a7f2e..2776758 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [unreleased] + +### 🐛 Bug Fixes + +- Status Colors on Monitor tab now reflect status of host. Closes #7 ## [0.2.0] - 2026-09-24 ### 🚀 Features diff --git a/src-tauri/src/net/dns.rs b/src-tauri/src/net/dns.rs index 189d520..29e0169 100644 --- a/src-tauri/src/net/dns.rs +++ b/src-tauri/src/net/dns.rs @@ -1,5 +1,4 @@ use std::net::IpAddr; -use tokio::task::JoinSet; /// Perform reverse DNS lookup on a single IP. /// Returns the hostname if found, None otherwise. @@ -18,33 +17,4 @@ pub async fn reverse_lookup(ip: IpAddr) -> Option { } _ => None, } -} - -/// Perform reverse DNS lookups on a batch of IPs concurrently. -/// Returns a Vec of (IpAddr, Option) pairs. -pub async fn reverse_lookup_batch( - ips: &[IpAddr], - max_concurrent: usize, -) -> Vec<(IpAddr, Option)> { - let mut results = Vec::with_capacity(ips.len()); - - for chunk in ips.chunks(max_concurrent) { - let mut join_set = JoinSet::new(); - - for &ip in chunk { - join_set.spawn(async move { - let hostname = reverse_lookup(ip).await; - (ip, hostname) - }); - } - - while let Some(result) = join_set.join_next().await { - match result { - Ok(pair) => results.push(pair), - Err(e) => tracing::warn!("DNS lookup task panicked: {}", e), - } - } - } - - results } \ No newline at end of file