Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbg! on Ipv6Addr should not show leading '0x' #81182

Closed
KSXGitHub opened this issue Jan 19, 2021 · 2 comments · Fixed by #81202
Closed

dbg! on Ipv6Addr should not show leading '0x' #81182

KSXGitHub opened this issue Jan 19, 2021 · 2 comments · Fixed by #81202
Labels
C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@KSXGitHub
Copy link

prior discussion
playground


I tried this code:

let ip = Ipv6Addr::new(123, 0, 3, 0, 0, 0, 36, 2);
dbg!(&ip);

I expected to see this happen: It prints 7b:0:3::24:2

Instead, this happened: It prints 0x7b:0x0:0x3::0x24:0x2

Meta

rustc --version --verbose:

rustc 1.48.0 (7eac88abb 2020-11-16)
binary: rustc
commit-hash: 7eac88abb2e57e752f3302f02be5f3ce3d7adfb4
commit-date: 2020-11-16
host: x86_64-unknown-linux-gnu
release: 1.48.0
LLVM version: 11.0
Backtrace

<backtrace>

@KSXGitHub KSXGitHub added the C-bug Category: This is a bug. label Jan 19, 2021
@jyn514 jyn514 added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Jan 19, 2021
@jyn514
Copy link
Member

jyn514 commented Jan 19, 2021

@KSXGitHub are you interested in fixing this yourself? I think the relevant code is

fmt::LowerHex::fmt(first, f)?;

@KSXGitHub
Copy link
Author

@jyn514 Nope, I'm not interested spending half a day compiling this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants