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

core: optimise Debug impl for ascii::Char #120314

Merged
merged 1 commit into from
Aug 11, 2024
Merged

core: optimise Debug impl for ascii::Char #120314

merged 1 commit into from
Aug 11, 2024

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Jan 24, 2024

Rather than writing character at a time, optimise Debug implementation
for core::ascii::Char such that it writes the entire representation
with a single write_str call.

With that, add tests for Display and Debug.

Issue: #110998

@rustbot
Copy link
Collaborator

rustbot commented Jan 24, 2024

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 24, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum
Copy link
Member

r=me with commits squashed.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 18, 2024
@mina86
Copy link
Contributor Author

mina86 commented Feb 18, 2024

? This PR is ready to go.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 18, 2024
@Mark-Simulacrum
Copy link
Member

This has 3 commits, two of which are not meaningful. Please squash them into one, as I asked.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 18, 2024
@mina86
Copy link
Contributor Author

mina86 commented Feb 18, 2024

Why is that a problem? Just look at the overall diff that GitHub offers or git diff $(git merge-base FETCH_HEAD) FETCH_HEAD if you prefer command line.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 18, 2024
@Mark-Simulacrum
Copy link
Member

We prefer not to merge PRs with random commits thrown in. bors doesn't currently support squashing when merging, so PR authors should do so on request.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 18, 2024
@oskgo
Copy link
Contributor

oskgo commented Jul 26, 2024

@mina86 Any updates on this? Thanks

@mina86
Copy link
Contributor Author

mina86 commented Aug 1, 2024 via email

Rather than writing character at a time, optimise Debug implementation
for core::ascii::Char such that it writes the entire representation as
with a single write_str call.

With that, add tests for Display and Debug implementations.
@mina86
Copy link
Contributor Author

mina86 commented Aug 10, 2024

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 10, 2024
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

Thanks!

@bors
Copy link
Collaborator

bors commented Aug 10, 2024

📌 Commit 7d1de7f has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 10, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 11, 2024
core: optimise Debug impl for ascii::Char

Rather than writing character at a time, optimise Debug implementation
for core::ascii::Char such that it writes the entire representation
with a single write_str call.

With that, add tests for Display and Debug.

Issue: rust-lang#110998
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 11, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#120314 (core: optimise Debug impl for ascii::Char)
 - rust-lang#128536 (Preliminary cleanup of `WitnessPat` hoisting/printing)
 - rust-lang#128592 (Promote aarch64-apple-darwin to Tier 1)
 - rust-lang#128762 (Use more slice patterns inside the compiler)
 - rust-lang#128875 (rm `import.used`)
 - rust-lang#128882 (make LocalWaker::will_wake consistent with Waker::will_wake)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e8f6819 into rust-lang:master Aug 11, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 11, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 11, 2024
Rollup merge of rust-lang#120314 - mina86:i, r=Mark-Simulacrum

core: optimise Debug impl for ascii::Char

Rather than writing character at a time, optimise Debug implementation
for core::ascii::Char such that it writes the entire representation
with a single write_str call.

With that, add tests for Display and Debug.

Issue: rust-lang#110998
@mina86 mina86 deleted the i branch August 11, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants