We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2428c15 commit 599d089Copy full SHA for 599d089
src/bytes_mut.rs
@@ -1054,6 +1054,19 @@ impl<'a> From<&'a str> for BytesMut {
1054
}
1055
1056
1057
+impl From<Vec<u8>> for BytesMut {
1058
+ fn from(src: Vec<u8>) -> BytesMut {
1059
+ BytesMut::from_vec(src)
1060
+ }
1061
+}
1062
+
1063
+impl From<Bytes> for BytesMut {
1064
+ fn from(src: Bytes) -> BytesMut {
1065
+ // TODO: can be optimized for certain `Bytes` representations
1066
+ BytesMut::from(src.as_ref())
1067
1068
1069
1070
impl From<BytesMut> for Bytes {
1071
fn from(src: BytesMut) -> Bytes {
1072
src.freeze()
0 commit comments