mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-07 00:00:13 +02:00
Re-add impl From<BytesMut> for Bytes (#348)
This commit is contained in:
committed by
Sean McArthur
parent
c7cf716180
commit
39b6646e66
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user