]> git.feebdaed.xyz Git - 0xmirror/tokio.git/commitdiff
net: remove PollEvented noise from Debug formats (#7675)
authorSean McArthur <sean@seanmonstar.com>
Mon, 13 Oct 2025 21:02:37 +0000 (17:02 -0400)
committerGitHub <noreply@github.com>
Mon, 13 Oct 2025 21:02:37 +0000 (21:02 +0000)
tokio/src/net/tcp/listener.rs
tokio/src/net/tcp/stream.rs
tokio/src/net/unix/datagram/socket.rs
tokio/src/net/unix/listener.rs
tokio/src/net/unix/stream.rs

index c8f8be0633d33dd783e57c5c3c9e247c32671148..34f4771a29605e4d89f188abbd424bfc00b3c667 100644 (file)
@@ -401,7 +401,7 @@ impl TryFrom<net::TcpListener> for TcpListener {
 
 impl fmt::Debug for TcpListener {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        self.io.fmt(f)
+        (*self.io).fmt(f)
     }
 }
 
index 550ddbd86c7e80157bb8cd4cbd7de863e5d1fc74..8d8127ffd865320adeccd5f12c01df9617517008 100644 (file)
@@ -1458,7 +1458,8 @@ impl AsyncWrite for TcpStream {
 
 impl fmt::Debug for TcpStream {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        self.io.fmt(f)
+        // skip PollEvented noise
+        (*self.io).fmt(f)
     }
 }
 
index 0a065ec3ebcbfb3e362b976bc14fb8d50e71307c..a57be3c919686399951afab125cdaec1672b4873 100644 (file)
@@ -1604,7 +1604,7 @@ impl TryFrom<std::os::unix::net::UnixDatagram> for UnixDatagram {
 
 impl fmt::Debug for UnixDatagram {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        self.io.fmt(f)
+        (*self.io).fmt(f)
     }
 }
 
index 996d3e1dced8b35dd8d59f4d96c5551ad3d8c976..b18e66111849840330b96ecb8025205b54f36021 100644 (file)
@@ -230,7 +230,7 @@ impl TryFrom<std::os::unix::net::UnixListener> for UnixListener {
 
 impl fmt::Debug for UnixListener {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        self.io.fmt(f)
+        (*self.io).fmt(f)
     }
 }
 
index 0381275e3af1aaae1224a40971318c494a10c5cc..26fe9e406d788ea76f61b873ff75e1b1a020d2f8 100644 (file)
@@ -1072,7 +1072,7 @@ impl UnixStream {
 
 impl fmt::Debug for UnixStream {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        self.io.fmt(f)
+        (*self.io).fmt(f)
     }
 }