Don't prefix 0x for each segments in dbg!(Ipv6)#81202
Merged
bors merged 2 commits intorust-lang:masterfrom Jan 22, 2021
Merged
Conversation
Contributor
|
r? @shepmaster (rust-highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
|
Somehow all my PRs have been assigned to Jake recently. |
pickfire
reviewed
Jan 20, 2021
Comment on lines
1616
to
+1617
| f.write_char(':')?; | ||
| fmt::LowerHex::fmt(segment, f)?; | ||
| write!(f, "{:x}", segment)?; |
Contributor
There was a problem hiding this comment.
write!(f, ":{:x}", segment)?;Should we perhaps do this instead? I wonder if this will be optimized with reduced write calls.
Member
There was a problem hiding this comment.
I don't think it makes much difference since the formatting code will call write_str on the ":" separately anyways.
Contributor
Author
There was a problem hiding this comment.
I am more concern about the style. However, I don't have a strong opinion on this.
Contributor
There was a problem hiding this comment.
I just wonder if there is a performance impact. Both works for me.
Member
|
@bors r+ |
Collaborator
|
📌 Commit 116b66a has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 22, 2021
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #81182