From 3c430ea332e696e5ca4c9aa5456d2e4abb01a0fe Mon Sep 17 00:00:00 2001 From: xnuter Date: Sat, 21 Nov 2020 19:35:15 -0800 Subject: [PATCH] Addressed a new clippy warning --- src/proxy_target.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/proxy_target.rs b/src/proxy_target.rs index ef8d987..ca7be6f 100644 --- a/src/proxy_target.rs +++ b/src/proxy_target.rs @@ -12,7 +12,6 @@ use rand::prelude::thread_rng; use rand::Rng; use serde::export::PhantomData; use std::collections::HashMap; -use std::iter::FromIterator; use std::net::SocketAddr; use std::sync::Arc; use std::time::Instant; @@ -159,7 +158,7 @@ impl SimpleCachingDnsResolver { async fn resolve(target: &str) -> io::Result> { debug!("Resolving DNS {}", target,); - let resolved = Vec::from_iter(tokio::net::lookup_host(target).await?); + let resolved: Vec = tokio::net::lookup_host(target).await?.collect(); info!("Resolved DNS {} to {:?}", target, resolved); if resolved.is_empty() {