From fd670a9ae527b534293eb692273285d7a1221cdd Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Tue, 14 Nov 2023 08:31:02 +0100 Subject: [PATCH] Use smoltcp constant in results from DNS --- embassy-net/src/dns.rs | 6 +++++- embassy-net/src/lib.rs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/embassy-net/src/dns.rs b/embassy-net/src/dns.rs index 6b804f9e..69fc5cdf 100644 --- a/embassy-net/src/dns.rs +++ b/embassy-net/src/dns.rs @@ -63,7 +63,11 @@ where } /// Make a query for a given name and return the corresponding IP addresses. - pub async fn query(&self, name: &str, qtype: DnsQueryType) -> Result, Error> { + pub async fn query( + &self, + name: &str, + qtype: DnsQueryType, + ) -> Result, Error> { self.stack.dns_query(name, qtype).await } } diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index b9315079..6aa476aa 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs @@ -494,7 +494,11 @@ impl Stack { /// Make a query for a given name and return the corresponding IP addresses. #[cfg(feature = "dns")] - pub async fn dns_query(&self, name: &str, qtype: dns::DnsQueryType) -> Result, dns::Error> { + pub async fn dns_query( + &self, + name: &str, + qtype: dns::DnsQueryType, + ) -> Result, dns::Error> { // For A and AAAA queries we try detect whether `name` is just an IP address match qtype { #[cfg(feature = "proto-ipv4")]