Skip to content

core: optimize Display for ByteStr#153021

Closed
joboet wants to merge 1 commit intorust-lang:mainfrom
joboet:optimize_bstr_display
Closed

core: optimize Display for ByteStr#153021
joboet wants to merge 1 commit intorust-lang:mainfrom
joboet:optimize_bstr_display

Conversation

@joboet
Copy link
Member

@joboet joboet commented Feb 23, 2026

This attempts to fix the doc-build regressions from #152865.

Calculating the width of the printed string is expensive, but wholly unnecessary if no padding was requested. I've also replaced the manual pre-/post-padding calculation with a call to Formatter::padding, which does the same thing.

@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 Feb 23, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 23, 2026

r? @scottmcm

rustbot has assigned @scottmcm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @scottmcm, libs
  • @scottmcm, libs expanded to 8 candidates
  • Random selection from Mark-Simulacrum, jhpratt, scottmcm

@joboet joboet closed this Feb 23, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 23, 2026
@joboet
Copy link
Member Author

joboet commented Feb 23, 2026

Superseded by #153025.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants