Skip to content

Conversation

CDirkx
Copy link
Contributor

@CDirkx CDirkx commented May 6, 2021

bytestring contains code for correctly debug formatting a byte slice ([u8]). This functionality is and has historically only been used to provide the debug formatting of byte-based os-strings (on unix etc.).

Having this functionality in the separate bytestring module was useful in the past to reduce duplication, as when it was added os_str_bytes was still split into sys::{unix, redox, wasi, etc.}::os_str. However, now that is no longer the case, there is not much reason for the bytestring functionality to be separate from os_str_bytes; I don't think it is very likely that another part of std will need to handle formatting byte strings that are not os-strings in the future (everything should be utf8). This is why this PR merges the functionality of bytestring directly into the debug implementation in os_str_bytes.

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label May 6, 2021
@rust-highfive
Copy link
Contributor

r? @joshtriplett

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 6, 2021
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 23, 2021
@crlf0710 crlf0710 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 11, 2021
@CDirkx CDirkx changed the title Merge sys_common::bytestring into os_str_bytes Merge sys_common::bytestring back into os_str_bytes Jun 20, 2021
@bors
Copy link
Collaborator

bors commented Jun 20, 2021

☔ The latest upstream changes (presumably #84967) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, thanks!

@JohnTitor
Copy link
Member

r? @JohnTitor @bors r+

@bors
Copy link
Collaborator

bors commented Jul 2, 2021

📌 Commit 059008f has been approved by JohnTitor

@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 Jul 2, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 2, 2021
Rollup of 7 pull requests

Successful merges:

 - rust-lang#84029 (add `track_path::path` fn for usage in `proc_macro`s)
 - rust-lang#85001 (Merge `sys_common::bytestring` back into `os_str_bytes`)
 - rust-lang#86308 (Docs: clarify that certain intrinsics are not unsafe)
 - rust-lang#86796 (Add a regression test for issue-70703)
 - rust-lang#86803 (Remove & from Command::args calls in documentation)
 - rust-lang#86807 (Fix double import in wasm thread )
 - rust-lang#86813 (Add a help message to `unused_doc_comments` lint)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fb736d9 into rust-lang:master Jul 2, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 2, 2021
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.

8 participants