Format Rust code using rustfmt
Rust static build and publish / Build static binary (x86_64-unknown-linux-musl, ubuntu-latest, linux-amd64) (push) Failing after 25s
Rust static build and publish / Build static binary (aarch64-apple-darwin, macos-latest, macos-arm64) (push) Has been cancelled
Rust static build and publish / Build static binary (x86_64-pc-windows-msvc, windows-latest, windows-amd64) (push) Has been cancelled
Rust static build and publish / Create Release Page (push) Has been cancelled
Rust static build and publish / Upload Release Assets (macos-latest, macos-arm64) (push) Has been cancelled
Rust static build and publish / Upload Release Assets (ubuntu-latest, linux-amd64) (push) Has been cancelled
Rust static build and publish / Upload Release Assets (windows-latest, windows-amd64) (push) Has been cancelled

This commit is contained in:
github-actions[bot]
2026-07-02 09:45:39 +00:00
committed by GitHub
parent aea2a927c2
commit 2c97a85054
+14 -6
View File
@@ -210,8 +210,9 @@ fn main() {
// Do DNS resolution in parallel but store results for ordered display later // Do DNS resolution in parallel but store results for ordered display later
let resolved_ips_with_indices = Arc::new(Mutex::new(Vec::<(String, IpAddr, usize)>::new())); let resolved_ips_with_indices = Arc::new(Mutex::new(Vec::<(String, IpAddr, usize)>::new()));
host_with_indices.par_iter().for_each(|(host, idx)| { host_with_indices
match lookup_host(&host.name) { .par_iter()
.for_each(|(host, idx)| match lookup_host(&host.name) {
Ok(ips) if !ips.is_empty() => { Ok(ips) if !ips.is_empty() => {
let ip = ips[0]; let ip = ips[0];
let mut results = resolved_ips_with_indices.lock().unwrap(); let mut results = resolved_ips_with_indices.lock().unwrap();
@@ -219,14 +220,21 @@ fn main() {
} }
Ok(_) => { Ok(_) => {
let mut results = resolved_ips_with_indices.lock().unwrap(); let mut results = resolved_ips_with_indices.lock().unwrap();
results.push((host.name.clone(), IpAddr::V4(std::net::Ipv4Addr::new(0, 0, 0, 0)), *idx)); results.push((
host.name.clone(),
IpAddr::V4(std::net::Ipv4Addr::new(0, 0, 0, 0)),
*idx,
));
} }
Err(_) => { Err(_) => {
let mut results = resolved_ips_with_indices.lock().unwrap(); let mut results = resolved_ips_with_indices.lock().unwrap();
results.push((host.name.clone(), IpAddr::V4(std::net::Ipv4Addr::new(0, 0, 0, 0)), *idx)); results.push((
host.name.clone(),
IpAddr::V4(std::net::Ipv4Addr::new(0, 0, 0, 0)),
*idx,
));
} }
} });
});
// Sort by original index to ensure hosts are displayed in order // Sort by original index to ensure hosts are displayed in order
let mut resolved_hosts = resolved_ips_with_indices.lock().unwrap().clone(); let mut resolved_hosts = resolved_ips_with_indices.lock().unwrap().clone();