From 912197936f38aa71cbfbd6b60fa144bc637a48f4 Mon Sep 17 00:00:00 2001 From: Christian Lewe Date: Thu, 9 Jan 2025 15:06:13 +0100 Subject: [PATCH] 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. --- src/lib.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e3e5b331..b71272fa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 @@ -109,7 +107,6 @@ impl fmt::Display for Error { } Error::Type(ref e) => fmt::Display::fmt(e, f), Error::Execution(ref e) => fmt::Display::fmt(e, f), - 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")] @@ -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),