Skip to content

Conversation

@seanmonstar
Copy link
Member

@seanmonstar seanmonstar commented Oct 13, 2025

This cleans up the debug output of println!("{:?}", tcp) from this:

// before
PollEvented {
    io: Some(
        TcpStream {
            addr: 1.2.3.4:36304,
            peer: 4.3.2.1:80,
            fd: 6,
        },
    ),
}

To this:

// after
TcpStream {
    addr: 1.2.3.4:36304,
    peer: 4.3.2.1:80,
    fd: 6,
}

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-net Module: tokio/net labels Oct 13, 2025
@Darksonn
Copy link
Contributor

Nice! Any chance you could do the same to the other sockets?

@seanmonstar seanmonstar force-pushed the sean/tcp-better-debug branch from 26d3c9c to 64e58ac Compare October 13, 2025 20:43
@seanmonstar
Copy link
Member Author

Updated for tcp, unix, and windows types that had a similar Debug impl.

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@Darksonn Darksonn enabled auto-merge (squash) October 13, 2025 20:45
@seanmonstar seanmonstar changed the title net: remove PollEvented noise from Debug for TcpStream net: remove PollEvented noise from Debug for sockets Oct 13, 2025
@Darksonn Darksonn merged commit 25a24de into master Oct 13, 2025
88 checks passed
@Darksonn Darksonn deleted the sean/tcp-better-debug branch October 13, 2025 21:02
@Darksonn Darksonn mentioned this pull request Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tokio Area: The main tokio crate M-net Module: tokio/net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants