feat(lib): implement compatibility with http crate

This commit is contained in:
Sam Rijs
2017-09-23 05:07:57 +10:00
committed by Sean McArthur
parent 92595e84a2
commit 0c7d375ba3
17 changed files with 535 additions and 1 deletions

View File

@@ -29,6 +29,11 @@ impl ByteStr {
pub fn as_str(&self) -> &str {
unsafe { str::from_utf8_unchecked(self.0.as_ref()) }
}
#[cfg(feature = "compat")]
pub fn into_bytes(self) -> Bytes {
self.0
}
}
impl Deref for ByteStr {