Skip to content

Commit 9121979

Browse files
committed
refactor: Remove unused error variant
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.
1 parent 1e09f45 commit 9121979

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ pub enum Error {
8888
Execution(bit_machine::ExecutionError),
8989
/// Witness iterator ended early
9090
NoMoreWitnesses,
91-
/// Finalization failed; did not have enough witness data to satisfy program.
92-
IncompleteFinalization,
9391
/// Tried to parse a jet but the name wasn't recognized
9492
InvalidJetName(String),
9593
/// Policy error
@@ -109,7 +107,6 @@ impl fmt::Display for Error {
109107
}
110108
Error::Type(ref e) => fmt::Display::fmt(e, f),
111109
Error::Execution(ref e) => fmt::Display::fmt(e, f),
112-
Error::IncompleteFinalization => f.write_str("unable to satisfy program"),
113110
Error::InvalidJetName(s) => write!(f, "unknown jet `{}`", s),
114111
Error::NoMoreWitnesses => f.write_str("no more witness data available"),
115112
#[cfg(feature = "elements")]
@@ -127,7 +124,6 @@ impl std::error::Error for Error {
127124
Error::Type(ref e) => Some(e),
128125
Error::Execution(ref e) => Some(e),
129126
Error::NoMoreWitnesses => None,
130-
Error::IncompleteFinalization => None,
131127
Error::InvalidJetName(..) => None,
132128
#[cfg(feature = "elements")]
133129
Error::Policy(ref e) => Some(e),

0 commit comments

Comments
 (0)