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

Rename Buf/BufMut, methods to chunk/chunk_mut #450

Merged
merged 6 commits into from Dec 18, 2020
Merged

Conversation

carllerche
Copy link
Member

@carllerche carllerche commented Dec 18, 2020

The bytes() / bytes_mut() name implies the method returns the full
set of bytes represented by Buf/BufMut. To rectify this, the methods
are renamed to chunk() and chunk_mut() to reflect the partial nature
of the returned byte slice.

Additionally, bytes_vectored() is renamed chunk_vectored().

Closes #447

The `bytes()` / `bytes_mut()` name implies the method returns the full
set of bytes represented by `Buf`/`BufMut`. To rectify this, the methods
are renamed to `chunk()` and `chunk_mut()` to reflect the partial nature
of the returned byte slice.

Closes #447
src/buf/buf_impl.rs Outdated Show resolved Hide resolved
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

lgtm, i'm fine with chunk as a name.

@carllerche carllerche merged commit 06907f3 into master Dec 18, 2020
@carllerche carllerche deleted the rename-bytes-fn branch December 18, 2020 19:04
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.

Consider renaming Buf::bytes() and BufMut::bytes_mut()
3 participants