Fix compile errors with Bytes conversion errors

This commit is contained in:
Alex Crichton
2017-07-26 12:16:14 -07:00
parent 78bb5dd8f9
commit e1d7076019
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1541,7 +1541,7 @@ impl From<HeaderName> for Bytes {
}
impl HttpTryFrom<Bytes> for HeaderName {
type Error = FromBytesError;
type Error = InvalidHeaderName;
#[inline]
fn try_from(bytes: Bytes) -> Result<Self, Self::Error> {
Self::from_bytes(bytes.as_ref())
+1 -1
View File
@@ -295,7 +295,7 @@ impl From<HeaderValue> for Bytes {
}
impl HttpTryFrom<Bytes> for HeaderValue {
type Error = InvalidValueError;
type Error = InvalidHeaderValue;
#[inline]
fn try_from(bytes: Bytes) -> Result<Self, Self::Error> {