Skip to content

Commit

Permalink
refactor: Remove unused error variant
Browse files Browse the repository at this point in the history
IncompleteFinalization was never a nice error. It told the caller that
something was wrong about the witness data, but not what exactly and
what to do about it. A better approach is to provide useful feedback
when the Bit Machine is run.
  • Loading branch information
uncomputable committed Jan 9, 2025
1 parent 2469baf commit 9389c67
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ pub enum Error {
Execution(bit_machine::ExecutionError),
/// Witness iterator ended early
NoMoreWitnesses,
/// Finalization failed; did not have enough witness data to satisfy program.
IncompleteFinalization,
/// Tried to parse a jet but the name wasn't recognized
InvalidJetName(String),
/// Policy error
Expand All @@ -109,7 +107,6 @@ impl fmt::Display for Error {
}
Error::Type(ref e) => write!(f, "{e}"),
Error::Execution(ref e) => write!(f, "{e}"),
Error::IncompleteFinalization => f.write_str("unable to satisfy program"),
Error::InvalidJetName(s) => write!(f, "unknown jet `{}`", s),
Error::NoMoreWitnesses => f.write_str("no more witness data available"),
#[cfg(feature = "elements")]
Expand All @@ -127,7 +124,6 @@ impl std::error::Error for Error {
Error::Type(ref e) => Some(e),
Error::Execution(ref e) => Some(e),
Error::NoMoreWitnesses => None,
Error::IncompleteFinalization => None,
Error::InvalidJetName(..) => None,
#[cfg(feature = "elements")]
Error::Policy(ref e) => Some(e),
Expand Down

0 comments on commit 9389c67

Please sign in to comment.