mirror of
https://github.com/openharmony/third_party_rust_http.git
synced 2026-07-19 14:43:33 -04:00
Fix compile errors with Bytes conversion errors
This commit is contained in:
+1
-1
@@ -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
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user