From 885b34b19b00adcde0dd923d67afbdfb1e163449 Mon Sep 17 00:00:00 2001 From: Luke Horsley Date: Fri, 21 Apr 2017 00:35:09 +0100 Subject: [PATCH] Renamed `TryFrom` associated type `Err` to `Error` This is due to https://github.com/rust-lang/rust/pull/40281. --- src/crypto/client_hello_message.rs | 2 +- src/crypto/key_exchange_algorithm.rs | 4 ++-- src/crypto/proof.rs | 4 ++-- src/crypto/rejection_message.rs | 2 +- src/crypto/server_configuration.rs | 2 +- src/frames/stream_frame.rs | 4 ++-- src/primitives/u24.rs | 2 +- src/primitives/u48.rs | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/crypto/client_hello_message.rs b/src/crypto/client_hello_message.rs index d2234ac..516d4af 100644 --- a/src/crypto/client_hello_message.rs +++ b/src/crypto/client_hello_message.rs @@ -17,7 +17,7 @@ pub struct ClientHelloMessage { } impl<'a> TryFrom<&'a QuicTagValueMap> for ClientHelloMessage { - type Err = Error; + type Error = Error; fn try_from(value: &'a QuicTagValueMap) -> Result { let server_name = value.get_optional_value(QuicTag::ServerNameIndication)?; diff --git a/src/crypto/key_exchange_algorithm.rs b/src/crypto/key_exchange_algorithm.rs index 8921172..9425e4a 100644 --- a/src/crypto/key_exchange_algorithm.rs +++ b/src/crypto/key_exchange_algorithm.rs @@ -43,7 +43,7 @@ impl From for QuicTag { } } impl<'a> TryFrom<&'a QuicTag> for KeyExchangeAlgorithm { - type Err = Error; + type Error = Error; fn try_from(value: &'a QuicTag) -> Result { Ok(match *value { @@ -55,7 +55,7 @@ impl<'a> TryFrom<&'a QuicTag> for KeyExchangeAlgorithm { } impl TryFrom for KeyExchangeAlgorithm { - type Err = Error; + type Error = Error; fn try_from(value: QuicTag) -> Result { KeyExchangeAlgorithm::try_from(&value) diff --git a/src/crypto/proof.rs b/src/crypto/proof.rs index 9011583..e8d2bce 100644 --- a/src/crypto/proof.rs +++ b/src/crypto/proof.rs @@ -41,7 +41,7 @@ impl From for QuicTag { } impl<'a> TryFrom<&'a QuicTag> for Proof { - type Err = Error; + type Error = Error; fn try_from(value: &'a QuicTag) -> Result { Ok(match *value { @@ -52,8 +52,8 @@ impl<'a> TryFrom<&'a QuicTag> for Proof { } impl TryFrom for Proof { - type Err = Error; fn try_from(value: QuicTag) -> Result { + type Error = Error; Proof::try_from(&value) } } \ No newline at end of file diff --git a/src/crypto/rejection_message.rs b/src/crypto/rejection_message.rs index 32b89a8..9dd8a28 100644 --- a/src/crypto/rejection_message.rs +++ b/src/crypto/rejection_message.rs @@ -14,7 +14,7 @@ pub struct RejectionMessage { } impl<'a> TryFrom<&'a QuicTagValueMap> for RejectionMessage { - type Err = Error; + type Error = Error; fn try_from(value: &'a QuicTagValueMap) -> Result { diff --git a/src/crypto/server_configuration.rs b/src/crypto/server_configuration.rs index f8e6124..7fee1e3 100644 --- a/src/crypto/server_configuration.rs +++ b/src/crypto/server_configuration.rs @@ -12,7 +12,7 @@ pub struct ServerConfiguration { } impl<'a> TryFrom<&'a QuicTagValueMap> for ServerConfiguration { - type Err = Error; + type Error = Error; fn try_from(value: &'a QuicTagValueMap) -> Result { let server_configuration_id = value.get_required_value(QuicTag::ServerConfigurationId)?; diff --git a/src/frames/stream_frame.rs b/src/frames/stream_frame.rs index 55e0380..b543c38 100644 --- a/src/frames/stream_frame.rs +++ b/src/frames/stream_frame.rs @@ -14,7 +14,7 @@ pub enum StreamIdLength { } impl TryFrom for StreamIdLength { - type Err = Error; + type Error = Error; fn try_from(value: usize) -> Result { let length = match value { @@ -94,7 +94,7 @@ pub enum StreamOffsetLength { } impl TryFrom for StreamOffsetLength { - type Err = Error; + type Error = Error; fn try_from(value: usize) -> Result { let length = match value { diff --git a/src/primitives/u24.rs b/src/primitives/u24.rs index 9b21aed..ec7eba2 100644 --- a/src/primitives/u24.rs +++ b/src/primitives/u24.rs @@ -39,7 +39,7 @@ impl From for u32 { } impl TryFrom for U24 { - type Err = Error; + type Error = Error; fn try_from(value: u32) -> Result { if value > MAX.into() { diff --git a/src/primitives/u48.rs b/src/primitives/u48.rs index 4385281..6429316 100644 --- a/src/primitives/u48.rs +++ b/src/primitives/u48.rs @@ -39,7 +39,7 @@ impl From for u64 { } impl TryFrom for U48 { - type Err = Error; + type Error = Error; fn try_from(value: u64) -> Result { if value > MAX.into() {