mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-15 00:00:18 +02:00
Implement Extend<Bytes> for BytesMut (#527)
This commit is contained in:
@@ -544,6 +544,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);
|
||||
|
||||
Reference in New Issue
Block a user