mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-21 00:00:12 +02:00
Impl Extend for BytesMut
This commit is contained in:
@@ -290,6 +290,13 @@ fn inline_storage() {
|
||||
assert_eq!(*bytes, zero[0..inline_cap()]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn extend() {
|
||||
let mut bytes = BytesMut::with_capacity(0);
|
||||
bytes.extend(LONG);
|
||||
assert_eq!(*bytes, LONG[..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn stress() {
|
||||
// Tests promoting a buffer from a vec -> shared in a concurrent situation
|
||||
|
||||
Reference in New Issue
Block a user