Skip to content

Commit fa51443

Browse files
committed
Update dependencies
1 parent ef9d202 commit fa51443

File tree

8 files changed

+55
-6
lines changed

8 files changed

+55
-6
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ members = [
110110
[workspace.dependencies]
111111
embassy-futures = { version = "0.1.2", default-features = false }
112112
embassy-sync = { version = "0.7", default-features = false }
113-
embassy-time = { version = "0.4", default-features = false }
114-
embedded-io-async = { version = "0.6", default-features = false }
113+
embassy-time = { version = "0.5", default-features = false }
114+
embedded-io-async = { version = "0.7", default-features = false }
115115
embedded-svc = { version = "0.28", default-features = false }
116116
heapless = { version = "0.8", default-features = false }
117117
domain = { version = "0.10", default-features = false, features = ["heapless"] }

edge-http/src/io.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ impl<E> From<UpgradeError> for Error<E> {
8282
}
8383
}
8484

85+
impl<E: embedded_io_async::Error> core::error::Error for Error<E> {}
86+
8587
impl<E> embedded_io_async::Error for Error<E>
8688
where
8789
E: embedded_io_async::Error,

edge-http/src/io/server.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,15 @@ where
584584
}
585585
}
586586

587+
impl<C: Debug + embedded_io_async::Error, E: Debug + Display> core::error::Error
588+
for HandleRequestError<C, E>
589+
{
590+
}
591+
587592
impl<C, E> embedded_io_async::Error for HandleRequestError<C, E>
588593
where
589594
C: Debug + embedded_io_async::Error,
590-
E: Debug,
595+
E: Debug + Display,
591596
{
592597
fn kind(&self) -> embedded_io_async::ErrorKind {
593598
match self {

edge-nal-embassy/src/dns.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use core::fmt;
12
use core::net::IpAddr;
23

34
use edge_nal::AddrType;
@@ -65,6 +66,14 @@ impl From<Error> for DnsError {
6566
}
6667
}
6768

69+
impl fmt::Display for DnsError {
70+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
71+
write!(f, "{:?}", self.0)
72+
}
73+
}
74+
75+
impl core::error::Error for DnsError {}
76+
6877
impl embedded_io_async::Error for DnsError {
6978
fn kind(&self) -> ErrorKind {
7079
ErrorKind::Other

edge-nal-embassy/src/tcp.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use core::fmt;
12
use core::net::SocketAddr;
23
use core::pin::pin;
34
use core::ptr::NonNull;
@@ -327,6 +328,20 @@ impl From<AcceptError> for TcpError {
327328
}
328329
}
329330

331+
impl fmt::Display for TcpError {
332+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
333+
match self {
334+
Self::General(e) => write!(f, "General: {:?}", e),
335+
Self::Connect(e) => write!(f, "Connect: {:?}", e),
336+
Self::Accept(e) => write!(f, "Accept: {:?}", e),
337+
Self::NoBuffers => write!(f, "No buffers"),
338+
Self::UnsupportedProto => write!(f, "Unsupported protocol"),
339+
}
340+
}
341+
}
342+
343+
impl core::error::Error for TcpError {}
344+
330345
impl embedded_io_async::Error for TcpError {
331346
fn kind(&self) -> ErrorKind {
332347
match self {

edge-nal-embassy/src/udp.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use core::fmt;
12
use core::net::{Ipv4Addr, Ipv6Addr, SocketAddr};
23
use core::ptr::NonNull;
34

@@ -340,6 +341,22 @@ impl From<embassy_net::MulticastError> for UdpError {
340341
}
341342
}
342343

344+
impl fmt::Display for UdpError {
345+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
346+
match self {
347+
Self::Recv(e) => write!(f, "Receiver: {:?}", e),
348+
Self::Send(e) => write!(f, "Sender: {:?}", e),
349+
Self::Bind(e) => write!(f, "Binder: {:?}", e),
350+
Self::MulticastGroupTableFull => write!(f, "Multicast group table full"),
351+
Self::MulticastUnaddressable => write!(f, "Multicast unaddressable"),
352+
Self::NoBuffers => write!(f, "No buffers"),
353+
Self::UnsupportedProto => write!(f, "Unsupported protocol"),
354+
}
355+
}
356+
}
357+
358+
impl core::error::Error for UdpError {}
359+
343360
impl embedded_io_async::Error for UdpError {
344361
fn kind(&self) -> ErrorKind {
345362
match self {

edge-nal/src/timeout.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ where
4545
}
4646
}
4747

48+
impl<E: embedded_io_async::Error> core::error::Error for WithTimeoutError<E> {}
49+
4850
impl<E> embedded_io_async::Error for WithTimeoutError<E>
4951
where
5052
E: embedded_io_async::Error,

edge-raw/src/io.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ impl<E> From<raw::Error> for Error<E> {
2222
}
2323
}
2424

25+
impl<E: embedded_io_async::Error> core::error::Error for Error<E> {}
26+
2527
impl<E> embedded_io_async::Error for Error<E>
2628
where
2729
E: embedded_io_async::Error,
@@ -62,9 +64,6 @@ where
6264
}
6365
}
6466

65-
#[cfg(feature = "std")]
66-
impl<E> std::error::Error for Error<E> where E: std::error::Error {}
67-
6867
/// A utility struct allowing to send and receive UDP packets over a raw socket.
6968
///
7069
/// The major difference between this struct and a regular `UdpSend` and `UdpReceive` pair of UDP socket halves

0 commit comments

Comments
 (0)