-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Open
Labels
A-fmtArea: `core::fmt`Area: `core::fmt`T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
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?
Metadata
Metadata
Assignees
Labels
A-fmtArea: `core::fmt`Area: `core::fmt`T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.