Skip to content

Commit 063ffd2

Browse files
author
Ulf Lilleengen
committed
Use same error type for connect and connection
1 parent 9b2dc8d commit 063ffd2

File tree

1 file changed

+3
-2
lines changed
  • embedded-nal-async/src/stack

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,11 @@ impl<T: TcpClientStack> TcpClientStack for &mut T {
175175
/// this trait allows creating multiple connections using the same TCP/IP stack.
176176
pub trait TcpConnect {
177177
/// Error type returned on connect failure.
178-
type Error;
178+
type Error: core::fmt::Debug;
179179

180180
/// Type holding state of a TCP connection.
181-
type Connection<'m>: embedded_io::asynch::Read + embedded_io::asynch::Write
181+
type Connection<'m>: embedded_io::asynch::Read<Error = Self::Error>
182+
+ embedded_io::asynch::Write<Error = Self::Error>
182183
where
183184
Self: 'm;
184185
/// Future returned by `connect` function.

0 commit comments

Comments
 (0)