aboutsummaryrefslogtreecommitdiff
path: root/tests/test_bytes.rs
diff options
context:
space:
mode:
authorGravatar Rob Ede <robjtede@icloud.com> 2022-01-24 08:58:18 +0000
committerGravatar GitHub <noreply@github.com> 2022-01-24 09:58:18 +0100
commit131dae161fff368e8b6dbc8da0abf053dac5e523 (patch)
treee719ac16345b16ca875c4485f4ea7ff5f33386eb /tests/test_bytes.rs
parent0e3b2466f199375031006857164fbf70e3ea479f (diff)
downloadbytes-131dae161fff368e8b6dbc8da0abf053dac5e523.tar.gz
bytes-131dae161fff368e8b6dbc8da0abf053dac5e523.tar.zst
bytes-131dae161fff368e8b6dbc8da0abf053dac5e523.zip
Implement `Extend<Bytes>` for `BytesMut` (#527)
Diffstat (limited to 'tests/test_bytes.rs')
-rw-r--r--tests/test_bytes.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_bytes.rs b/tests/test_bytes.rs
index 3819b9f..860474a 100644
--- a/tests/test_bytes.rs
+++ b/tests/test_bytes.rs
@@ -545,6 +545,13 @@ fn extend_from_slice_mut() {
}
#[test]
+fn extend_mut_from_bytes() {
+ let mut bytes = BytesMut::with_capacity(0);
+ bytes.extend([Bytes::from(LONG)]);
+ assert_eq!(*bytes, LONG[..]);
+}
+
+#[test]
fn extend_mut_without_size_hint() {
let mut bytes = BytesMut::with_capacity(0);
let mut long_iter = LONG.iter();