Export algebra-core::error

This commit is contained in:
Pratyush Mishra
2020-02-28 00:11:48 -08:00
parent 2298df2e78
commit faf179c43d
2 changed files with 0 additions and 22 deletions

View File

@@ -38,10 +38,6 @@ pub use self::{
signature::SigRandomizePkGadget, signature::SigRandomizePkGadget,
}; };
#[cfg(feature = "std")]
pub type Error = Box<dyn std::error::Error>;
#[cfg(not(feature = "std"))]
pub type Error = Box<dyn algebra_core::Error>; pub type Error = Box<dyn algebra_core::Error>;
#[derive(Debug)] #[derive(Debug)]
@@ -60,13 +56,4 @@ impl core::fmt::Display for CryptoError {
} }
} }
#[cfg(feature = "std")]
impl std::error::Error for CryptoError {
#[inline]
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
None
}
}
#[cfg(not(feature = "std"))]
impl algebra_core::Error for CryptoError {} impl algebra_core::Error for CryptoError {}

View File

@@ -255,15 +255,6 @@ impl core::fmt::Display for MerkleTreeError {
} }
} }
#[cfg(feature = "std")]
impl std::error::Error for MerkleTreeError {
#[inline]
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
None
}
}
#[cfg(not(feature = "std"))]
impl algebra_core::Error for MerkleTreeError {} impl algebra_core::Error for MerkleTreeError {}
/// Returns the log2 value of the given number. /// Returns the log2 value of the given number.