Skip to content

Remove redundancy and fix padding on some bytes display function#150142

Open
yhx-12243 wants to merge 1 commit into
rust-lang:mainfrom
yhx-12243:main
Open

Remove redundancy and fix padding on some bytes display function#150142
yhx-12243 wants to merge 1 commit into
rust-lang:mainfrom
yhx-12243:main

Conversation

@yhx-12243

Copy link
Copy Markdown

Remove redundancy and fix padding on some bytes display function, based on the discussion on #134915 (comment).

@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 Dec 19, 2025
@rustbot

rustbot commented Dec 19, 2025

Copy link
Copy Markdown
Collaborator

r? @ChrisDenton

rustbot has assigned @ChrisDenton.
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

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@ChrisDenton

Copy link
Copy Markdown
Member

@rustbot author it seems like this does make a difference in debug output?

@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 Jan 8, 2026
@rustbot

rustbot commented Jan 8, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot rustbot added the has-merge-commits PR has merge commits, merge with caution. label Jan 22, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@yhx-12243

Copy link
Copy Markdown
Author

@rustbot author it seems like this does make a difference in debug output?

Indeed. Maybe one can discuss whether it is worth divided into two implentations.

@Dylan-DPC

Copy link
Copy Markdown
Member

@yhx-12243 this has merge commits which are against the policy as linked above. Kindly make the respective changes

@rustbot

rustbot commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rustbot rustbot removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. has-merge-commits PR has merge commits, merge with caution. labels Jul 9, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-gcc-core-tests failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- bstr::test_debug stderr ----

thread 'main' (18645) panicked at library/coretests/tests/bstr.rs:5:5:
assertion `left == right` failed
  left: "\"\\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x11\\x12\\r\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f \\x7f\\x80\\x81\\xfe\\xff\""
 right: "\"\\0\\u{1}\\u{2}\\u{3}\\u{4}\\u{5}\\u{6}\\u{7}\\u{8}\\t\\n\\u{11}\\u{12}\\r\\u{14}\\u{15}\\u{16}\\u{17}\\u{18}\\u{19}\\u{1a}\\u{1b}\\u{1c}\\u{1d}\\u{1e}\\u{1f} \\u{7f}\\x80\\x81\\xFE\\xFF\""
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- bstr::test_debug stdout end ----
---- ffi::cstr::debug stdout ----
---- ffi::cstr::debug stderr ----

thread 'main' (18860) panicked at library/coretests/tests/ffi/cstr.rs:26:5:
assertion `left == right` failed
  left: "\"abc\\u{1}\\u{2}\\n…\\xFF\""
 right: "\"abc\\x01\\x02\\n…\\xff\""
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- ffi::cstr::debug stdout end ----

failures:

Important

For more information how to resolve CI failures of this job, visit this link.

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.

5 participants