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

This commit is contained in:
Thayne McCombs
2019-12-19 12:09:14 -07:00
committed by Sean McArthur
parent 419e36e67c
commit 7974f2d645
+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()