Skip to content

Commit f603589

Browse files
authored
Merge pull request #56 from rust-embedded-community/fix/dns-mutability
Change self references in dns stack methods to mutable
2 parents f4d3726 + 1d50620 commit f603589

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## Unreleased
99

10-
* None
10+
- Changed self references in dns stack methods to mutable, to follow the network stack implementations.
1111

1212
## [0.5.0] - 2021-05-20
1313

src/dns.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub trait Dns {
3232
/// Resolve the first ip address of a host, given its hostname and a desired
3333
/// address record type to look for
3434
fn get_host_by_name(
35-
&self,
35+
&mut self,
3636
hostname: &str,
3737
addr_type: AddrType,
3838
) -> nb::Result<IpAddr, Self::Error>;
@@ -43,5 +43,5 @@ pub trait Dns {
4343
/// 255 bytes [`rfc1035`]
4444
///
4545
/// [`rfc1035`]: https://tools.ietf.org/html/rfc1035
46-
fn get_host_by_address(&self, addr: IpAddr) -> nb::Result<String<256>, Self::Error>;
46+
fn get_host_by_address(&mut self, addr: IpAddr) -> nb::Result<String<256>, Self::Error>;
4747
}

0 commit comments

Comments
 (0)