diff --git a/src/bytes_mut.rs b/src/bytes_mut.rs index 7a1544434..8579f8c69 100644 --- a/src/bytes_mut.rs +++ b/src/bytes_mut.rs @@ -1020,6 +1020,12 @@ impl<'a> From<&'a str> for BytesMut { } } +impl From 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()