diff --git a/src/dns.rs b/src/dns.rs index 2e7ff4d..be4c04e 100644 --- a/src/dns.rs +++ b/src/dns.rs @@ -47,7 +47,11 @@ pub trait Dns { /// buffer to guarantee it'll always be large enough. /// /// [`rfc1035`]: https://tools.ietf.org/html/rfc1035 - fn get_host_by_address(&self, addr: IpAddr, result: &mut [u8]) -> Result; + fn get_host_by_address( + &mut self, + addr: IpAddr, + result: &mut [u8], + ) -> nb::Result; } impl Dns for &mut T { @@ -61,7 +65,11 @@ impl Dns for &mut T { T::get_host_by_name(self, hostname, addr_type) } - fn get_host_by_address(&self, addr: IpAddr, result: &mut [u8]) -> Result { + fn get_host_by_address( + &mut self, + addr: IpAddr, + result: &mut [u8], + ) -> nb::Result { T::get_host_by_address(self, addr, result) } }