Skip to content

Commit

Permalink
Fix self-referential Display impl
Browse files Browse the repository at this point in the history
  • Loading branch information
dconnolly committed Nov 12, 2021
1 parent 6e2e70b commit 7d8b9ca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zebra-consensus/src/primitives/halo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,17 @@ impl From<zebra_chain::orchard::ShieldedData> for Item {
#[derive(Clone, Debug, Error, Eq, PartialEq)]
pub enum Halo2Error {
/// The constraint system is not satisfied.
// #[default]
ConstraintSystemFailure,
/// Catchall for now until https://github.com/zcash/halo2/pull/394 is merged
Other,
}

impl fmt::Display for Halo2Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
write!(f, "{}", self)
match self {
Halo2Error::ConstraintSystemFailure => write!(f, "Constraint system failure"),
_ => write!(f, "Unknown Halo2 error"),
}
}
}

Expand Down

0 comments on commit 7d8b9ca

Please sign in to comment.