Re-add impl From<BytesMut> for Bytes (#348)

This commit is contained in:
Thayne McCombs
2019-12-19 11:09:14 -08:00
committed by Sean McArthur
parent c7cf716180
commit 39b6646e66
+6
View File
@@ -1020,6 +1020,12 @@ impl<'a> From<&'a str> for BytesMut {
}
}
impl From<BytesMut> for Bytes {
fn from(src: BytesMut) -> Bytes {
src.freeze()
}
}
impl PartialEq for BytesMut {
fn eq(&self, other: &BytesMut) -> bool {
self.as_slice() == other.as_slice()