-
Notifications
You must be signed in to change notification settings - Fork 13.4k
add BorrowedBuf::buf*
accessor functions for getting the original buffer
#98962
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add BorrowedBuf::buf*
accessor functions for getting the original buffer
#98962
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
(rust-highfive has picked a reviewer for you, use r? to override) |
buf_mut looks unsound, as you can deinitialize bytes that are assume to be init.
|
020e8cb
to
0d5bd5b
Compare
nice catch, i changed |
@rustbot label +T-libs-api -T-libs |
Hi, this is an API change and so needs to go through the ACP process, as described by the bot. Please open one if you haven't already, and link it here. @rustbot label -S-waiting-on-review +S-waiting-on-ACP |
|
ReadBuf::buf*
accessor functions for getting the original bufferBorrowedBuf::buf*
accessor functions for getting the original buffer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you look into rebasing this past #97015?
Would these methods be needed only on BorrowedBuf
, or also on BorrowedCursor
?
☔ The latest upstream changes (presumably #117736) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's pick this up in rust-lang/libs-team#65, or a new ACP, if there is still a use case for this.
Thanks anyway for the PR!
I noticed these functions were missing so I had to use an annoying workaround...
ACP: rust-lang/libs-team#65 [accepted]