mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-13 00:00:32 +02:00
Add vectored support to Buf and BufMut
This commit is contained in:
+2
-1
@@ -1229,7 +1229,8 @@ impl<'a> From<&'a [u8]> for BytesMut {
|
||||
}
|
||||
} else {
|
||||
let mut buf = BytesMut::with_capacity(src.len());
|
||||
buf.put(src.as_ref());
|
||||
let src: &[u8] = src.as_ref();
|
||||
buf.put(src);
|
||||
buf
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user