Browse Source

Export `algebra-core::error`

master
Pratyush Mishra 4 years ago
parent
commit
faf179c43d
2 changed files with 0 additions and 22 deletions
  1. +0
    -13
      crypto-primitives/src/lib.rs
  2. +0
    -9
      crypto-primitives/src/merkle_tree/mod.rs

+ 0
- 13
crypto-primitives/src/lib.rs

@ -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 {}

+ 0
- 9
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 {} impl algebra_core::Error for MerkleTreeError {}
/// Returns the log2 value of the given number. /// Returns the log2 value of the given number.

Loading…
Cancel
Save