Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement core::error::Error for all error types #341

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {}