Skip to content

Commit

Permalink
Merge pull request #60 from drogue-iot/update-nal
Browse files Browse the repository at this point in the history
fix: update to embedded-nal-async 0.7
  • Loading branch information
Ulf Lilleengen authored Nov 10, 2023
2 parents 925e95e + d8aba03 commit 3f27e81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "reqwless"
version = "0.9.1"
version = "0.10.0"
edition = "2021"
resolver = "2"
description = "HTTP client for embedded devices"
Expand All @@ -16,7 +16,7 @@ exclude = [".github"]
buffered-io = { version = "0.4.0", features = ["async"] }
embedded-io = { version = "0.6" }
embedded-io-async = { version = "0.6" }
embedded-nal-async = "0.6.0"
embedded-nal-async = "0.7.0"
httparse = { version = "1.8.0", default-features = false }
heapless = "0.7"
hex = { version = "0.4", default-features = false }
Expand Down
12 changes: 6 additions & 6 deletions tests/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ impl embedded_nal_async::Dns for LoopbackDns {
Ok(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)))
}

async fn get_host_by_address(&self, _: IpAddr) -> Result<heapless::String<256>, Self::Error> {
async fn get_host_by_address(&self, _: IpAddr, _: &mut [u8]) -> Result<usize, Self::Error> {
Err(TestError)
}
}
Expand All @@ -356,7 +356,7 @@ impl embedded_nal_async::Dns for StdDns {
Err(std::io::ErrorKind::AddrNotAvailable.into())
}

async fn get_host_by_address(&self, _addr: IpAddr) -> Result<heapless::String<256>, Self::Error> {
async fn get_host_by_address(&self, _: IpAddr, _: &mut [u8]) -> Result<usize, Self::Error> {
todo!()
}
}
Expand All @@ -375,10 +375,10 @@ impl embedded_nal_async::TcpConnect for TokioTcp {
type Error = std::io::Error;
type Connection<'m> = FromTokio<TcpStream>;

async fn connect<'m>(&'m self, remote: embedded_nal_async::SocketAddr) -> Result<Self::Connection<'m>, Self::Error>
where
Self: 'm,
{
async fn connect<'m>(
&'m self,
remote: embedded_nal_async::SocketAddr,
) -> Result<Self::Connection<'m>, Self::Error> {
let ip = match remote {
embedded_nal_async::SocketAddr::V4(a) => a.ip().octets().into(),
embedded_nal_async::SocketAddr::V6(a) => a.ip().octets().into(),
Expand Down

0 comments on commit 3f27e81

Please sign in to comment.