Skip to content

Commit

Permalink
Avoid allocating domain_data everytime as it has the Clone trait.
Browse files Browse the repository at this point in the history
Signed-off-by: Edu4rdSHL <edu4rdshl@protonmail.com>
  • Loading branch information
Edu4rdSHL committed Feb 13, 2022
1 parent ba82875 commit e26ae06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dnslib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ pub async fn return_hosts_data(
trustable_resolver.ipv4_lookup(host.trim_end_matches('.').to_owned() + ".");
let wildcard_ips = wildcard_ips.clone();

async move {
let mut domain_data = DomainData::default();
let mut domain_data = DomainData::default();

async move {
if let Ok(ip) = resolver_fut.await {
if disable_double_check {
domain_data.ipv4_addresses = ip
Expand Down

0 comments on commit e26ae06

Please sign in to comment.