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

Consider implementing Buf for &mut Bytes #238

Closed
NeoLegends opened this issue Dec 14, 2018 · 2 comments
Closed

Consider implementing Buf for &mut Bytes #238

NeoLegends opened this issue Dec 14, 2018 · 2 comments

Comments

@NeoLegends
Copy link

NeoLegends commented Dec 14, 2018

Currently it's only implemented for &Bytes, so that advancing the buffer will not advance the Bytes properly. This is an issue if one's doing bytes.as_ref().into_buf() to temporarily obtain a Buf without consuming the Bytes.

Implementing Buf for Bytes would also work in my situation.

@NeoLegends NeoLegends changed the title Implement Buf for &mut Bytes Consider implementing Buf for &mut Bytes Dec 14, 2018
@carllerche
Copy link
Member

If the rust compiler allows it, it is probably fine to do so.

@NeoLegends
Copy link
Author

NeoLegends commented Dec 15, 2018

Ah, I guess #210 would supersede this, since it will impl Buf for Bytes. Guess I'll just wait until that lands.

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

No branches or pull requests

2 participants