Skip to content

Commit

Permalink
impl AsMut<[u8]> for BytesMut (#143) (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
pshc authored and carllerche committed Jul 2, 2017
1 parent b9ccd2a commit 6750a26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,12 @@ impl ops::Deref for BytesMut {
}
}

impl AsMut<[u8]> for BytesMut {
fn as_mut(&mut self) -> &mut [u8] {
self.inner.as_mut()
}
}

impl ops::DerefMut for BytesMut {
#[inline]
fn deref_mut(&mut self) -> &mut [u8] {
Expand Down

0 comments on commit 6750a26

Please sign in to comment.