@@ -59,7 +59,7 @@ impl<Io, S, A> AsyncRead for MeteredIo<Io, S, A>
5959where
6060 Io : AsyncRead + AsyncWrite + PeerAddress < A > + Unpin ,
6161 A : Address ,
62- S : for < ' a > TryFrom < & ' a Io , Error = io :: Error > ,
62+ S : for < ' a > TryFrom < & ' a Io , Error : Debug > ,
6363{
6464 fn poll_read (
6565 self : Pin < & mut Self > ,
@@ -78,7 +78,7 @@ impl<Io, S, A> AsyncWrite for MeteredIo<Io, S, A>
7878where
7979 Io : AsyncRead + AsyncWrite + PeerAddress < A > + Unpin ,
8080 A : Address ,
81- S : for < ' a > TryFrom < & ' a Io , Error = io :: Error > ,
81+ S : for < ' a > TryFrom < & ' a Io , Error : Debug > ,
8282{
8383 fn poll_write (
8484 self : Pin < & mut Self > ,
@@ -123,7 +123,7 @@ impl<Io, S, A> MeteredIo<Io, S, A>
123123where
124124 Io : AsyncRead + AsyncWrite + PeerAddress < A > ,
125125 A : Address ,
126- S : for < ' a > TryFrom < & ' a Io , Error = io :: Error > ,
126+ S : for < ' a > TryFrom < & ' a Io , Error : Debug > ,
127127{
128128 /// Creates a new `MeteredIo` wrapper around the given `Io` object, and initializes default
129129 /// stats. The `sender` is used to send the latest stats to the caller.
@@ -146,10 +146,10 @@ where
146146 match S :: try_from ( & self . inner ) {
147147 Ok ( stats) => {
148148 if let Err ( e) = self . sender . send ( stats) {
149- tracing:: error!( err = ?e, "failed to update TCP stats" ) ;
149+ tracing:: error!( err = ?e, "failed to update transport stats" ) ;
150150 }
151151 }
152- Err ( e) => tracing:: error!( err = ?e, "failed to gather TCP stats" ) ,
152+ Err ( e) => tracing:: error!( errror = ?e, "failed to gather transport stats" ) ,
153153 }
154154
155155 self . next_refresh = now + self . refresh_interval ;
@@ -170,7 +170,7 @@ pub trait Transport<A: Address> {
170170 type Io : AsyncRead + AsyncWrite + PeerAddress < A > + Send + Unpin ;
171171
172172 /// The statistics for the transport (specifically its underlying IO object).
173- type Stats : Default + Send + Sync + for < ' a > TryFrom < & ' a Self :: Io , Error = io :: Error > ;
173+ type Stats : Default + Debug + Send + Sync + for < ' a > TryFrom < & ' a Self :: Io , Error : Debug > ;
174174
175175 /// An error that occurred when setting up the connection.
176176 type Error : std:: error:: Error + From < io:: Error > + Send + Sync ;
0 commit comments