u16 implements the Copy trait, no need to declare everytime.

This commit is contained in:
Eduard Tolosa 2020-10-03 16:17:43 -05:00
parent 79dc570295
commit f7d881e280

View file

@ -95,9 +95,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut stdin = io::stdin(); let mut stdin = io::stdin();
stdin.read_to_string(&mut buffer).await?; stdin.read_to_string(&mut buffer).await?;
let hosts: Vec<String> = buffer.lines().map(str::to_owned).collect(); let hosts: Vec<String> = buffer.lines().map(str::to_owned).collect();
let mut response_code = 0;
futures::stream::iter(hosts.into_iter().map(|host| async move { futures::stream::iter(hosts.into_iter().map(|host| async move {
let mut response_code = 0;
let mut protocol = String::new(); let mut protocol = String::new();
let client = reqwest::Client::builder() let client = reqwest::Client::builder()
.timeout(std::time::Duration::from_secs(timeout)) .timeout(std::time::Duration::from_secs(timeout))