Skip to content

Commit

Permalink
Addressed a new clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
xnuter committed Nov 22, 2020
1 parent e651584 commit 3c430ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/proxy_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -159,7 +158,7 @@ impl SimpleCachingDnsResolver {

async fn resolve(target: &str) -> io::Result<Vec<SocketAddr>> {
debug!("Resolving DNS {}", target,);
let resolved = Vec::from_iter(tokio::net::lookup_host(target).await?);
let resolved: Vec<SocketAddr> = tokio::net::lookup_host(target).await?.collect();
info!("Resolved DNS {} to {:?}", target, resolved);

if resolved.is_empty() {
Expand Down

0 comments on commit 3c430ea

Please sign in to comment.