Skip to content

Commit

Permalink
feat: implement core::error::Error for all error types (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter authored Nov 18, 2024
1 parent 616892e commit 0fe84be
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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).

Expand Down
2 changes: 2 additions & 0 deletions air/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ impl fmt::Display for AssertionError {
}
}
}

impl core::error::Error for AssertionError {}
4 changes: 4 additions & 0 deletions crypto/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ impl fmt::Display for MerkleTreeError {
}
}

impl core::error::Error for MerkleTreeError {}

// RANDOM COIN ERROR
// ================================================================================================

Expand Down Expand Up @@ -89,3 +91,5 @@ impl fmt::Display for RandomCoinError {
}
}
}

impl core::error::Error for RandomCoinError {}
2 changes: 2 additions & 0 deletions fri/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,5 @@ impl fmt::Display for VerifierError {
}
}
}

impl core::error::Error for VerifierError {}
2 changes: 2 additions & 0 deletions prover/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ impl fmt::Display for ProverError {
}
}
}

impl core::error::Error for ProverError {}
2 changes: 2 additions & 0 deletions utils/core/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ impl fmt::Display for DeserializationError {
}
}
}

impl core::error::Error for DeserializationError {}
4 changes: 2 additions & 2 deletions utils/core/src/serde/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand All @@ -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()
}
}

Expand Down
2 changes: 2 additions & 0 deletions verifier/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@ impl fmt::Display for VerifierError {
}
}
}

impl core::error::Error for VerifierError {}

0 comments on commit 0fe84be

Please sign in to comment.