Skip to content

Commit ac92f77

Browse files
committed
Change blocking Dns::get_host_by_address back to mutable self, to align with Dns::get_host_by_name
1 parent 5c41b3a commit ac92f77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dns.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub trait Dns {
4747
/// buffer to guarantee it'll always be large enough.
4848
///
4949
/// [`rfc1035`]: https://tools.ietf.org/html/rfc1035
50-
fn get_host_by_address(&self, addr: IpAddr, result: &mut [u8]) -> Result<usize, Self::Error>;
50+
fn get_host_by_address(&mut self, addr: IpAddr, result: &mut [u8]) -> Result<usize, Self::Error>;
5151
}
5252

5353
impl<T: Dns> Dns for &mut T {
@@ -61,7 +61,7 @@ impl<T: Dns> Dns for &mut T {
6161
T::get_host_by_name(self, hostname, addr_type)
6262
}
6363

64-
fn get_host_by_address(&self, addr: IpAddr, result: &mut [u8]) -> Result<usize, Self::Error> {
64+
fn get_host_by_address(&mut self, addr: IpAddr, result: &mut [u8]) -> Result<usize, Self::Error> {
6565
T::get_host_by_address(self, addr, result)
6666
}
6767
}

0 commit comments

Comments
 (0)