Skip to content

Commit

Permalink
Move SigType down the file
Browse files Browse the repository at this point in the history
Put the `SigType` enum below where it is first used instead of in the
middle of the error types/impls.
  • Loading branch information
tcharding committed May 19, 2022
1 parent 832fc8e commit 3bdeb8c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/miniscript/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,6 @@ pub enum ScriptContextError {
MultiANotAllowed,
}

#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub enum SigType {
/// Ecdsa signature
Ecdsa,
/// Schnorr Signature
Schnorr,
}

impl fmt::Display for ScriptContextError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Expand Down Expand Up @@ -312,6 +304,14 @@ where
fn name_str() -> &'static str;
}

#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub enum SigType {
/// Ecdsa signature
Ecdsa,
/// Schnorr Signature
Schnorr,
}

/// Legacy ScriptContext
/// To be used as P2SH scripts
/// For creation of Bare scriptpubkeys, construct the Miniscript
Expand Down

0 comments on commit 3bdeb8c

Please sign in to comment.