Added build script

This commit is contained in:
2026-10-09 09:46:32 -04:00
parent fd8bb16d40
commit cf2cc9f8ed
13 changed files with 50 additions and 35 deletions
+2 -4
View File
@@ -3,9 +3,7 @@ use std::net::IpAddr;
/// Perform reverse DNS lookup on a single IP.
/// Returns the hostname if found, None otherwise.
pub async fn reverse_lookup(ip: IpAddr) -> Option<String> {
let result = tokio::task::spawn_blocking(move || {
dns_lookup::lookup_addr(&ip)
}).await;
let result = tokio::task::spawn_blocking(move || dns_lookup::lookup_addr(&ip)).await;
match result {
Ok(Ok(hostname)) => {
@@ -17,4 +15,4 @@ pub async fn reverse_lookup(ip: IpAddr) -> Option<String> {
}
_ => None,
}
}
}
+1 -1
View File
@@ -1,2 +1,2 @@
pub mod dns;
pub mod range;
pub mod dns;
+1 -1
View File
@@ -140,4 +140,4 @@ mod tests {
fn test_reversed_range() {
assert!(parse_ip_range("192.168.1.10-192.168.1.1").is_err());
}
}
}