aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorPaolo Asperti <[email protected]>2022-08-09 10:07:01 +0200
committerPaolo Asperti <[email protected]>2022-08-09 10:07:01 +0200
commitbf3e9471a6710ca19da2eff38f5cb35151edf787 (patch)
tree17f61af0ef7aa4cda26938216967ff3050ae5a59 /src
parentd878222fc185eb2c235bf2fbc461deed05be71f7 (diff)
downloadrustdesk-server-bf3e9471a6710ca19da2eff38f5cb35151edf787.tar.gz
rustdesk-server-bf3e9471a6710ca19da2eff38f5cb35151edf787.zip
proposed modifications
Diffstat (limited to 'src')
-rw-r--r--src/utils.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/utils.rs b/src/utils.rs
index d851cf1..7b36aed 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -132,13 +132,10 @@ fn doctor(server_address_unclean: &str) {
let ips: Vec<std::net::IpAddr> = lookup_host(server_address).unwrap();
println!("Found {} IP addresses: ", ips.iter().count());
- for ip in ips.iter() {
- println!(" - {}", ip);
- }
+ ips.iter().for_each(|ip| println!(" - {ip}"));
+
+ ips.iter().for_each(|ip| doctor_ip(*ip, Some(server_address)));
- for ip in ips.iter() {
- doctor_ip(*ip, Some(server_address));
- }
} else {
// user requested an ip address
doctor_ip(server_ipaddr.unwrap(), None);