Add vectored support to Buf and BufMut

This commit is contained in:
Carl Lerche
2017-03-01 13:18:29 -08:00
parent 4462056e26
commit bb9bf7ee3e
7 changed files with 103 additions and 1 deletions
+2 -1
View File
@@ -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
}
}