Use reference instead of move Host

This commit is contained in:
Daniel Sanchez Quiros 2022-10-25 10:51:24 +02:00
parent e9711c0201
commit 00f3eee5f1
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ use crate::Result;
/// The nameserver can optionally be specified to resolve the enrtree url. Otherwise uses the default system dns.
pub fn waku_dns_discovery(
url: &Url,
server: Option<Host>,
server: Option<&Host>,
timeout: Option<Duration>,
) -> Result<Vec<Multiaddr>> {
let result = unsafe {

View File

@ -324,7 +324,7 @@ impl WakuNodeHandle<Running> {
pub fn dns_discovery(
&self,
url: &Url,
nameserver: Option<Host>,
nameserver: Option<&Host>,
timeout: Option<Duration>,
) -> Result<Vec<Multiaddr>> {
discovery::waku_dns_discovery(url, nameserver, timeout)