From d8aba030307ed91c46bd0af652e03e6187637ecc Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Fri, 10 Nov 2023 17:54:25 +0100 Subject: [PATCH] fix: update to embedded-nal-async 0.7 --- Cargo.toml | 4 ++-- tests/client.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 44e0fb9..bf8a590 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" @@ -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 } diff --git a/tests/client.rs b/tests/client.rs index 7447118..40baa0c 100644 --- a/tests/client.rs +++ b/tests/client.rs @@ -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, Self::Error> { + async fn get_host_by_address(&self, _: IpAddr, _: &mut [u8]) -> Result { Err(TestError) } } @@ -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, Self::Error> { + async fn get_host_by_address(&self, _: IpAddr, _: &mut [u8]) -> Result { todo!() } } @@ -375,10 +375,10 @@ impl embedded_nal_async::TcpConnect for TokioTcp { type Error = std::io::Error; type Connection<'m> = FromTokio; - async fn connect<'m>(&'m self, remote: embedded_nal_async::SocketAddr) -> Result, Self::Error> - where - Self: 'm, - { + async fn connect<'m>( + &'m self, + remote: embedded_nal_async::SocketAddr, + ) -> Result, 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(),