Skip to content

Commit 64e58ac

Browse files
committed
net: remove PollEvented noise from Debug formats
1 parent c1fa25f commit 64e58ac

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

tokio/src/net/tcp/listener.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ impl TryFrom<net::TcpListener> for TcpListener {
401401

402402
impl fmt::Debug for TcpListener {
403403
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
404-
self.io.fmt(f)
404+
(*self.io).fmt(f)
405405
}
406406
}
407407

tokio/src/net/tcp/stream.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,8 @@ impl AsyncWrite for TcpStream {
14581458

14591459
impl fmt::Debug for TcpStream {
14601460
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1461-
self.io.fmt(f)
1461+
// skip PollEvented noise
1462+
(*self.io).fmt(f)
14621463
}
14631464
}
14641465

tokio/src/net/unix/datagram/socket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ impl TryFrom<std::os::unix::net::UnixDatagram> for UnixDatagram {
16041604

16051605
impl fmt::Debug for UnixDatagram {
16061606
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1607-
self.io.fmt(f)
1607+
(*self.io).fmt(f)
16081608
}
16091609
}
16101610

tokio/src/net/unix/listener.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl TryFrom<std::os::unix::net::UnixListener> for UnixListener {
230230

231231
impl fmt::Debug for UnixListener {
232232
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
233-
self.io.fmt(f)
233+
(*self.io).fmt(f)
234234
}
235235
}
236236

tokio/src/net/unix/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ impl UnixStream {
10721072

10731073
impl fmt::Debug for UnixStream {
10741074
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1075-
self.io.fmt(f)
1075+
(*self.io).fmt(f)
10761076
}
10771077
}
10781078

0 commit comments

Comments
 (0)