Debug and Display of `SocketAddrV6` omit `flowinfo`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
As noted in a recent blog post by @sunshowers,
For most types in Rust, the Debug representation breaks out all the fields and their values. But for SocketAddrV6, the Debug implementation (quite reasonably) forwards to the Display implementation. So the flowinfo field is completely hidden, and the only way to look at it is through the flowinfo method.
This is also not the first time someone has been surprised by a lack of roundtrip serialization of this structure due to this field, see #77205.
It seems reasonable to preserve the Display implementation for this type, as it follows an RFC, but also to differentiate Debug to expose the flowinfo field.
If Debug were changed for this type, what should be the new string format?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Debug and Display implementations in core/net/socket_addr.rs, then read the flowinfo method documentation and the linked blog post. Review issue #77205 for prior context; done means reaching agreement on a new Debug string format that exposes flowinfo while preserving Display behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100