codec: implement Encoder<BytesMut> for BytesCodec (#4465)

This commit is contained in:
Sunyeop Lee
2022-02-08 09:11:24 -05:00
committed by GitHub
parent d6143c9566
commit 0b05ef638d
2 changed files with 13 additions and 0 deletions
+3
View File
@@ -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]