mirror of
https://github.com/openharmony/third_party_rust_bytes.git
synced 2026-07-19 17:05:29 -04:00
Re-add impl From<BytesMut> for Bytes (#348)
This commit is contained in:
committed by
Sean McArthur
parent
419e36e67c
commit
7974f2d645
@@ -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