From faf179c43d57d3e647549029956a75cf7b4ff9cb Mon Sep 17 00:00:00 2001 From: Pratyush Mishra Date: Fri, 28 Feb 2020 00:11:48 -0800 Subject: [PATCH] Export `algebra-core::error` --- crypto-primitives/src/lib.rs | 13 ------------- crypto-primitives/src/merkle_tree/mod.rs | 9 --------- 2 files changed, 22 deletions(-) diff --git a/crypto-primitives/src/lib.rs b/crypto-primitives/src/lib.rs index 430dbf9..9fcd806 100644 --- a/crypto-primitives/src/lib.rs +++ b/crypto-primitives/src/lib.rs @@ -38,10 +38,6 @@ pub use self::{ signature::SigRandomizePkGadget, }; -#[cfg(feature = "std")] -pub type Error = Box; - -#[cfg(not(feature = "std"))] pub type Error = Box; #[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 {} diff --git a/crypto-primitives/src/merkle_tree/mod.rs b/crypto-primitives/src/merkle_tree/mod.rs index acc431f..80e002e 100644 --- a/crypto-primitives/src/merkle_tree/mod.rs +++ b/crypto-primitives/src/merkle_tree/mod.rs @@ -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 {} /// Returns the log2 value of the given number.