Skip to content

Commit 3bdeb8c

Browse files
committed
Move SigType down the file
Put the `SigType` enum below where it is first used instead of in the middle of the error types/impls.
1 parent 832fc8e commit 3bdeb8c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/miniscript/context.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@ pub enum ScriptContextError {
7575
MultiANotAllowed,
7676
}
7777

78-
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
79-
pub enum SigType {
80-
/// Ecdsa signature
81-
Ecdsa,
82-
/// Schnorr Signature
83-
Schnorr,
84-
}
85-
8678
impl fmt::Display for ScriptContextError {
8779
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8880
match *self {
@@ -312,6 +304,14 @@ where
312304
fn name_str() -> &'static str;
313305
}
314306

307+
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
308+
pub enum SigType {
309+
/// Ecdsa signature
310+
Ecdsa,
311+
/// Schnorr Signature
312+
Schnorr,
313+
}
314+
315315
/// Legacy ScriptContext
316316
/// To be used as P2SH scripts
317317
/// For creation of Bare scriptpubkeys, construct the Miniscript

0 commit comments

Comments
 (0)