aboutsummaryrefslogtreecommitdiff
path: root/tests/test_buf_mut.rs
diff options
context:
space:
mode:
authorGravatar Carl Lerche <me@carllerche.com> 2020-12-18 11:04:31 -0800
committerGravatar GitHub <noreply@github.com> 2020-12-18 11:04:31 -0800
commit06907f3e7badc98b83902c27ab19661693b0979a (patch)
tree32708b56819050278270c7b6781556d59a3d5445 /tests/test_buf_mut.rs
parent54f5ced6c58c47f721836a9444654de4c8d687a1 (diff)
downloadbytes-06907f3e7badc98b83902c27ab19661693b0979a.tar.gz
bytes-06907f3e7badc98b83902c27ab19661693b0979a.tar.zst
bytes-06907f3e7badc98b83902c27ab19661693b0979a.zip
Rename Buf/BufMut, methods to chunk/chunk_mut (#450)
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. `bytes_vectored()` is renamed `chunks_vectored()`. Closes #447
Diffstat (limited to 'tests/test_buf_mut.rs')
-rw-r--r--tests/test_buf_mut.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_buf_mut.rs b/tests/test_buf_mut.rs
index 406ec51..8d270e3 100644
--- a/tests/test_buf_mut.rs
+++ b/tests/test_buf_mut.rs
@@ -11,7 +11,7 @@ fn test_vec_as_mut_buf() {
assert_eq!(buf.remaining_mut(), usize::MAX);
- assert!(buf.bytes_mut().len() >= 64);
+ assert!(buf.chunk_mut().len() >= 64);
buf.put(&b"zomg"[..]);
@@ -81,8 +81,8 @@ fn test_deref_bufmut_forwards() {
unreachable!("remaining_mut");
}
- fn bytes_mut(&mut self) -> &mut UninitSlice {
- unreachable!("bytes_mut");
+ fn chunk_mut(&mut self) -> &mut UninitSlice {
+ unreachable!("chunk_mut");
}
unsafe fn advance_mut(&mut self, _: usize) {