-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Don't prefix 0x for each segments in dbg!(Ipv6)
#81202
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @shepmaster (rust-highfive has picked a reviewer for you, use r? to override) |
Somehow all my PRs have been assigned to Jake recently. |
f.write_char(':')?; | ||
fmt::LowerHex::fmt(segment, f)?; | ||
write!(f, "{:x}", segment)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write!(f, ":{:x}", segment)?;
Should we perhaps do this instead? I wonder if this will be optimized with reduced write calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes much difference since the formatting code will call write_str
on the ":"
separately anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am more concern about the style. However, I don't have a strong opinion on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wonder if there is a performance impact. Both works for me.
@bors r+ |
📌 Commit 116b66a has been approved by |
Rollup of 10 pull requests Successful merges: - rust-lang#80573 (Deny rustc::internal lints for rustdoc and clippy) - rust-lang#81173 (Expand docs on Iterator::intersperse) - rust-lang#81194 (Stabilize std::panic::panic_any.) - rust-lang#81202 (Don't prefix 0x for each segments in `dbg!(Ipv6)`) - rust-lang#81225 (Make 'docs' nullable in rustdoc-json output) - rust-lang#81227 (Remove doctree::StructType) - rust-lang#81233 (Document why not use concat! in dbg! macro) - rust-lang#81236 (Gracefully handle loop labels missing leading `'` in different positions) - rust-lang#81241 (Turn alloc's force_expr macro into a regular macro_rules.) - rust-lang#81242 (Enforce statically that `MIN_NON_ZERO_CAP` is calculated at compile time) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #81182