Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit d94bc03

Browse files
committed
gbytes: Impl AsRef<[u8]>
1 parent a3d0ab7 commit d94bc03

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bytes.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ impl fmt::Debug for Bytes {
8787
}
8888
}
8989

90+
impl AsRef<[u8]> for Bytes {
91+
fn as_ref(&self) -> &[u8] {
92+
&*self
93+
}
94+
}
95+
9096
impl Deref for Bytes {
9197
type Target = [u8];
9298

0 commit comments

Comments
 (0)