Add comment why thiserror is not used

This commit is contained in:
bjorn3
2021-03-19 16:41:39 +01:00
parent 84c79982e7
commit 82f3ad4f1a
6 changed files with 14 additions and 0 deletions

View File

@@ -102,6 +102,8 @@ pub struct VerifierError {
pub message: String,
}
// This is manually implementing Error and Display instead of using thiserror to reduce the amount
// of dependencies used by Cranelift.
impl std::error::Error for VerifierError {}
impl Display for VerifierError {
@@ -179,6 +181,8 @@ pub type VerifierResult<T> = Result<T, VerifierErrors>;
#[derive(Debug, Default, PartialEq, Eq, Clone)]
pub struct VerifierErrors(pub Vec<VerifierError>);
// This is manually implementing Error and Display instead of using thiserror to reduce the amount
// of dependencies used by Cranelift.
impl std::error::Error for VerifierErrors {}
impl VerifierErrors {