Inline as_ref functions on Bytes and BytesMut (#154)

This commit is contained in:
Alex Crichton
2017-08-05 21:12:26 -07:00
committed by Carl Lerche
parent 6750a26fd0
commit 7839100389
+2
View File
@@ -793,6 +793,7 @@ impl Clone for Bytes {
}
impl AsRef<[u8]> for Bytes {
#[inline]
fn as_ref(&self) -> &[u8] {
self.inner.as_ref()
}
@@ -1391,6 +1392,7 @@ impl<'a> IntoBuf for &'a BytesMut {
}
impl AsRef<[u8]> for BytesMut {
#[inline]
fn as_ref(&self) -> &[u8] {
self.inner.as_ref()
}