Merge pull request #44 from carllerche/uri-parts

Uri reform
This commit is contained in:
Sean McArthur
2017-07-12 17:50:15 -07:00
committed by GitHub
2 changed files with 854 additions and 287 deletions
+11
View File
@@ -8,6 +8,11 @@ pub struct ByteStr {
}
impl ByteStr {
#[inline]
pub fn new() -> ByteStr {
ByteStr { bytes: Bytes::new() }
}
#[inline]
pub fn from_static(val: &'static str) -> ByteStr {
ByteStr { bytes: Bytes::from_static(val.as_bytes()) }
@@ -42,3 +47,9 @@ impl<'a> From<&'a str> for ByteStr {
ByteStr { bytes: Bytes::from(src) }
}
}
impl From<ByteStr> for Bytes {
fn from(src: ByteStr) -> Self {
src.bytes
}
}
+843 -287
View File
File diff suppressed because it is too large Load Diff