Skip to content
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

Expose ReadBufCursor::remaining and ReadBufCursor::put_slice #3700

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

nox
Copy link
Contributor

@nox nox commented Jul 10, 2024

There is currently no way to write to ReadBufCursor without unsafe code, even though writing a slice to it like one would do to a Buf shouldn't require unsafe code.

@nox
Copy link
Contributor Author

nox commented Jul 10, 2024

There is also #3515 that is similar, but more involved.

Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

Seems fair to add these :)

src/rt/io.rs Outdated Show resolved Hide resolved
src/rt/io.rs Show resolved Hide resolved
@nox nox force-pushed the readbufcursor-convenience branch from c799237 to 327d902 Compare July 15, 2024 08:01
@nox
Copy link
Contributor Author

nox commented Jul 15, 2024

@seanmonstar I addressed both comments.

There is currently no way to write to ReadBufCursor without
unsafe code, even though writing a slice to it like one would
do to a Buf shouldn't require unsafe code.
@nox nox force-pushed the readbufcursor-convenience branch from 327d902 to a64315b Compare July 15, 2024 08:20
@seanmonstar seanmonstar merged commit 5a13041 into master Jul 15, 2024
21 checks passed
@seanmonstar seanmonstar deleted the readbufcursor-convenience branch July 15, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants