From 17b9c494731601f462965e7bf2673602e9260730 Mon Sep 17 00:00:00 2001 From: daxpedda Date: Tue, 20 Jul 2021 10:28:22 +0200 Subject: [PATCH] Remove breaking change --- src/keypair.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/keypair.rs b/src/keypair.rs index 3cad914..e989af8 100644 --- a/src/keypair.rs +++ b/src/keypair.rs @@ -7,7 +7,7 @@ #![allow(unsafe_code)] -use crate::errors::{InternalPakeError, PakeError, ProtocolError}; +use crate::errors::{InternalPakeError, ProtocolError}; use crate::group::Group; #[cfg(test)] use generic_array::typenum::Unsigned; @@ -286,7 +286,7 @@ pub trait SecretKey: Clone + Sized + Zeroize { fn serialize(&self) -> Vec; /// Deserialization from bytes - fn deserialize(input: &[u8]) -> Result; + fn deserialize(input: &[u8]) -> Result; } impl SecretKey for PrivateKey { @@ -308,8 +308,8 @@ impl SecretKey for PrivateKey { self.to_vec() } - fn deserialize(input: &[u8]) -> Result { - PrivateKey::from_bytes(input).map_err(|_| PakeError::SerializationError.into()) + fn deserialize(input: &[u8]) -> Result { + PrivateKey::from_bytes(input).map_err(InternalPakeError::from) } }