mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
codec: implement Encoder<BytesMut> for BytesCodec (#4465)
This commit is contained in:
@@ -38,6 +38,9 @@ fn bytes_encoder() {
|
||||
codec
|
||||
.encode(Bytes::from_static(&[0; INITIAL_CAPACITY + 1]), &mut buf)
|
||||
.unwrap();
|
||||
codec
|
||||
.encode(BytesMut::from(&b"hello"[..]), &mut buf)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user