-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Implement str to [u8] conversion for refcounted containers #96078
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @thomcc (rust-highfive has picked a reviewer for you, use r? to override) |
The implementation seems fine and I'm not opposed, but r? rust-lang/libs-api @rustbot label +T-libs-api |
@rust-lang/libs-api: impl From<Rc<str>> for Rc<[u8]> {…}
impl From<Arc<str>> for Arc<[u8]> {…} This is the rust/library/alloc/src/boxed.rs Lines 1508 to 1509 in 1e6fe58
@rfcbot fcp merge |
Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
@bors r+ |
📌 Commit 100006b has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (f75d884): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
If we're going to allow this, we should also update the Safety notes for Also note how this conversion is safe only because both types are |
This seems motivated to complete the APIs for shared containers since we already have similar allocation-free conversions for strings like
From<Box<[u8]>> for Box<str>
.Insta-stable since it's a new trait impl?