Skip to content

Commit 34d9ac5

Browse files
committed
Update embedded-io-async to v0.5
1 parent afdbe62 commit 34d9ac5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

embedded-nal-async/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ ip_in_core = []
1818
no-std-net = "0.6"
1919
heapless = "^0.7"
2020
embedded-nal = { version = "0.7.0", path = "../" }
21-
embedded-io = { version = "0.4.0", default-features = false, features = ["async"] }
21+
embedded-io-async = { version = "0.5.0" }

embedded-nal-async/src/stack/tcp.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
use crate::SocketAddr;
22

33
/// This trait is implemented by TCP/IP stacks. The trait allows the underlying driver to
4-
/// construct multiple connections that implement the I/O traits from embedded-io.
4+
/// construct multiple connections that implement the I/O traits from embedded-io-async.
55
///
66
/// The associated connection type should close the connection when dropped.
77
pub trait TcpConnect {
88
/// Error type returned on connect failure.
9-
type Error: embedded_io::Error;
9+
type Error: embedded_io_async::Error;
1010

1111
/// Type holding state of a TCP connection. Should close the connection when dropped.
12-
type Connection<'a>: embedded_io::asynch::Read<Error = Self::Error>
13-
+ embedded_io::asynch::Write<Error = Self::Error>
12+
type Connection<'a>: embedded_io_async::Read<Error = Self::Error>
13+
+ embedded_io_async::Write<Error = Self::Error>
1414
where
1515
Self: 'a;
1616

embedded-nal-async/src/stack/udp.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::SocketAddr;
2828
/// address at connect time.
2929
pub trait ConnectedUdp {
3030
/// Error type returned by send and receive operations.
31-
type Error: embedded_io::Error;
31+
type Error: embedded_io_async::Error;
3232

3333
/// Send the provided data to the connected peer
3434
async fn send(&mut self, data: &[u8]) -> Result<(), Self::Error>;
@@ -67,7 +67,7 @@ pub trait ConnectedUdp {
6767
/// applicable. The implementer MAY check them for compatibility, and SHOULD do that in debug mode.
6868
pub trait UnconnectedUdp {
6969
/// Error type returned by send and receive operations.
70-
type Error: embedded_io::Error;
70+
type Error: embedded_io_async::Error;
7171

7272
/// Send the provided data to a peer
7373
///
@@ -114,13 +114,13 @@ pub trait UnconnectedUdp {
114114
}
115115

116116
/// This trait is implemented by UDP/IP stacks. The trait allows the underlying driver to
117-
/// construct multiple connections that implement the I/O traits from embedded-io.
117+
/// construct multiple connections that implement the I/O traits from embedded-io-async.
118118
///
119119
/// Note that stacks with exotic connection creation methods may still not implement this, yet have
120120
/// objects that implement [`ConnectedUdp`] or similar.
121121
pub trait UdpStack {
122122
/// Error type returned on socket creation failure.
123-
type Error: embedded_io::Error;
123+
type Error: embedded_io_async::Error;
124124

125125
/// Eventual socket return type of the [`.connect()`] method
126126
type Connected: ConnectedUdp<Error = Self::Error>;

0 commit comments

Comments
 (0)