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
Add a subslice function for Bytes (#198) #208
Conversation
Sorry for letting this hang. I will try to up prioritize it. The implementation is good. The name is bugging me. I would like it to match the pattern of the others. So, I would like a name like:
Except, I can't think of anything good :( Best I could think of is |
Or, what about let sub_bytes = bytes.slice_for(&sub); |
Another (via Ralith in gitter): let sub_bytes = bytes.slice_ref(&sub); |
I'm like
|
Cool, I'll rebase this and use |
afb8a32
to
b986199
Compare
I've renamed the function to |
Thanks for sticking with it 👍 |
I'm going to rebase the PR against the |
This lets us take Bytes and a &[u8] slice that is contained in it, and create a new Bytes that corresponds to that subset slice. tokio-rs#198
CI hung for some reason... |
Yay, thanks! |
No description provided.