From 7d529d939849505755efd492b7e293bf2572d71c Mon Sep 17 00:00:00 2001 From: glendc Date: Tue, 25 Jun 2024 14:32:24 +0200 Subject: [PATCH] fmt rust code (src/dns/mod.rs) --- src/dns/mod.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/dns/mod.rs b/src/dns/mod.rs index 48c7bb37..f0b158f7 100644 --- a/src/dns/mod.rs +++ b/src/dns/mod.rs @@ -85,11 +85,7 @@ impl Dns { &self, domain: &Domain, ) -> Result, OpaqueError> { - if let Some(addresses) = self - .overwrites - .as_ref() - .and_then(|cache| cache.get(domain)) - { + if let Some(addresses) = self.overwrites.as_ref().and_then(|cache| cache.get(domain)) { return Ok(Either::A(addresses.clone().into_iter().filter_map( |ip| match ip { IpAddr::V4(ip) => Some(ip), @@ -113,11 +109,7 @@ impl Dns { &self, domain: &Domain, ) -> Result, OpaqueError> { - if let Some(addresses) = self - .overwrites - .as_ref() - .and_then(|cache| cache.get(domain)) - { + if let Some(addresses) = self.overwrites.as_ref().and_then(|cache| cache.get(domain)) { return Ok(Either::A(addresses.clone().into_iter().filter_map( |ip| match ip { IpAddr::V4(_) => None,