Skip to content

Commit

Permalink
fmt rust code (src/dns/mod.rs)
Browse files Browse the repository at this point in the history
  • Loading branch information
GlenDC committed Jun 25, 2024
1 parent edfff0a commit 7d529d9
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/dns/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ impl Dns {
&self,
domain: &Domain,
) -> Result<impl Iterator<Item = Ipv4Addr>, 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),
Expand All @@ -113,11 +109,7 @@ impl Dns {
&self,
domain: &Domain,
) -> Result<impl Iterator<Item = Ipv6Addr>, 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,
Expand Down

0 comments on commit 7d529d9

Please sign in to comment.