Skip to content

Commit 6513d34

Browse files
authored
Merge pull request #50 from rust-embedded-community/fix/nb-dns
Change DNS trait to return nb, and bump dependencies
2 parents 2ae093d + 86b95eb commit 6513d34

File tree

6 files changed

+21
-8
lines changed

6 files changed

+21
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
include:
2020
# Test MSRV
21-
- rust: 1.36.0
21+
- rust: 1.46.0
2222
TARGET: x86_64-unknown-linux-gnu
2323

2424
# Test nightly but don't fail

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
* None
1111

12+
## [0.4.0] - 2021-03-05
13+
14+
### Changed
15+
- Changed [`Dns`](./src/dns.rs) methods to return `nb::Result<..>` to allow non-blocking implementations.
16+
- Bump dependency version of `heapless` to `v0.6.1` to address security issue of sub-dependency.
17+
- Bump dependency version of `no-std-net` to `v0.5`.
18+
- Bump MSRV to 1.46.0 to get `const-fn` for `no-std-net`.
19+
20+
1221
## [0.3.0] - 2021-02-15
1322

1423
### Added

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "embedded-nal"
3-
version = "0.3.0" # remember to update html_root_url
3+
version = "0.4.0" # remember to update html_root_url
44
authors = [
55
"Jonathan 'theJPster' Pallant <[email protected]>",
66
"Mathias Koch <[email protected]>",
@@ -19,5 +19,5 @@ categories = ["embedded", "hardware-support", "no-std", "network-programming"]
1919

2020
[dependencies]
2121
nb = "1"
22-
no-std-net = "0.4"
23-
heapless = "^0.5"
22+
no-std-net = "0.5"
23+
heapless = "^0.6.1"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ These issues / PRs will be labeled as `proposal`s in the issue tracker.
3535

3636
## Minimum Supported Rust Version (MSRV)
3737

38-
This crate is guaranteed to compile on stable Rust 1.36.0 and up. It *might*
38+
This crate is guaranteed to compile on stable Rust 1.46.0 and up. It *might*
3939
compile with older versions but that may change in any new patch release.
4040

4141
## License

src/dns.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@ pub trait Dns {
3131

3232
/// Resolve the first ip address of a host, given its hostname and a desired
3333
/// address record type to look for
34-
fn get_host_by_name(&self, hostname: &str, addr_type: AddrType) -> Result<IpAddr, Self::Error>;
34+
fn get_host_by_name(
35+
&self,
36+
hostname: &str,
37+
addr_type: AddrType,
38+
) -> nb::Result<IpAddr, Self::Error>;
3539

3640
/// Resolve the hostname of a host, given its ip address
3741
///
3842
/// **Note**: A fully qualified domain name (FQDN), has a maximum length of
3943
/// 255 bytes [`rfc1035`]
4044
///
4145
/// [`rfc1035`]: https://tools.ietf.org/html/rfc1035
42-
fn get_host_by_address(&self, addr: IpAddr) -> Result<String<consts::U256>, Self::Error>;
46+
fn get_host_by_address(&self, addr: IpAddr) -> nb::Result<String<consts::U256>, Self::Error>;
4347
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! # embedded-nal - A Network Abstraction Layer for Embedded Systems
22
3-
#![doc(html_root_url = "https://docs.rs/embedded-nal/0.3.0")]
3+
#![doc(html_root_url = "https://docs.rs/embedded-nal/0.4.0")]
44
#![no_std]
55
#![deny(missing_docs)]
66
#![deny(unsafe_code)]

0 commit comments

Comments
 (0)