Revert "Revert "remove rustc-serialize (#359) (#386)" (#466)" (#477)

This reverts commit 0a3d4cdfad.
This commit is contained in:
Pierre Krieger
2018-09-17 10:05:37 +02:00
committed by GitHub
parent 2a7a48b496
commit d719ac6037
8 changed files with 181 additions and 58 deletions

View File

@ -20,7 +20,7 @@
//! Defines the `SecioError` enum that groups all possible errors in SECIO.
use crypto::symmetriccipher::SymmetricCipherError;
use aes_ctr::stream_cipher::LoopError;
use std::error;
use std::fmt;
use std::io::Error as IoError;
@ -55,8 +55,8 @@ pub enum SecioError {
/// The final check of the handshake failed.
NonceVerificationFailed,
/// Error while decoding/encoding data.
CipherError(SymmetricCipherError),
/// Error with block cipher.
CipherError(LoopError),
/// The received frame was of invalid length.
FrameTooShort,
@ -115,9 +115,9 @@ impl fmt::Display for SecioError {
}
}
impl From<SymmetricCipherError> for SecioError {
impl From<LoopError> for SecioError {
#[inline]
fn from(err: SymmetricCipherError) -> SecioError {
fn from(err: LoopError) -> SecioError {
SecioError::CipherError(err)
}
}