diff --git a/CHANGELOG.md b/CHANGELOG.md index 78563dabf..6ba38b967 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.10.2 (TBD) +- Implement `core::error::Error` for error types (#341). + ## 0.10.1 (2024-10-30) - Fixed partition hashing and add logging to aux trace building (#338). diff --git a/air/src/errors.rs b/air/src/errors.rs index 2f0fa1665..38196ba7d 100644 --- a/air/src/errors.rs +++ b/air/src/errors.rs @@ -42,3 +42,5 @@ impl fmt::Display for AssertionError { } } } + +impl core::error::Error for AssertionError {} diff --git a/crypto/src/errors.rs b/crypto/src/errors.rs index 5e4f3a6da..637b90c99 100644 --- a/crypto/src/errors.rs +++ b/crypto/src/errors.rs @@ -61,6 +61,8 @@ impl fmt::Display for MerkleTreeError { } } +impl core::error::Error for MerkleTreeError {} + // RANDOM COIN ERROR // ================================================================================================ @@ -89,3 +91,5 @@ impl fmt::Display for RandomCoinError { } } } + +impl core::error::Error for RandomCoinError {} diff --git a/fri/src/errors.rs b/fri/src/errors.rs index 7961b8831..2947b17a8 100644 --- a/fri/src/errors.rs +++ b/fri/src/errors.rs @@ -73,3 +73,5 @@ impl fmt::Display for VerifierError { } } } + +impl core::error::Error for VerifierError {} diff --git a/prover/src/errors.rs b/prover/src/errors.rs index a0d01a233..6fd560582 100644 --- a/prover/src/errors.rs +++ b/prover/src/errors.rs @@ -39,3 +39,5 @@ impl fmt::Display for ProverError { } } } + +impl core::error::Error for ProverError {} diff --git a/utils/core/src/errors.rs b/utils/core/src/errors.rs index 52df2b007..1bba975bf 100644 --- a/utils/core/src/errors.rs +++ b/utils/core/src/errors.rs @@ -32,3 +32,5 @@ impl fmt::Display for DeserializationError { } } } + +impl core::error::Error for DeserializationError {} diff --git a/utils/core/src/serde/mod.rs b/utils/core/src/serde/mod.rs index edf9ba1c8..90ac01b6d 100644 --- a/utils/core/src/serde/mod.rs +++ b/utils/core/src/serde/mod.rs @@ -344,7 +344,7 @@ impl Serializable for str { } fn get_size_hint(&self) -> usize { - self.len().get_size_hint() + self.as_bytes().len() + self.len().get_size_hint() + self.len() } } @@ -355,7 +355,7 @@ impl Serializable for String { } fn get_size_hint(&self) -> usize { - self.len().get_size_hint() + self.as_bytes().len() + self.len().get_size_hint() + self.len() } } diff --git a/verifier/src/errors.rs b/verifier/src/errors.rs index e1b072db5..fadaee1fa 100644 --- a/verifier/src/errors.rs +++ b/verifier/src/errors.rs @@ -99,3 +99,5 @@ impl fmt::Display for VerifierError { } } } + +impl core::error::Error for VerifierError {}