From fe3b1e1140f1daaeb37ef1c749036bbac00ac067 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 18 May 2023 16:10:33 +1000 Subject: [PATCH] Move From for Error impl Move the From impl to be below the other code for the error. Refactor only, no logic changes. --- bitcoin/src/crypto/sighash.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bitcoin/src/crypto/sighash.rs b/bitcoin/src/crypto/sighash.rs index d5f67ed7..56b5ab1c 100644 --- a/bitcoin/src/crypto/sighash.rs +++ b/bitcoin/src/crypto/sighash.rs @@ -277,6 +277,10 @@ impl std::error::Error for Error { } } +impl From for Error { + fn from(e: io::Error) -> Self { Error::Io(e.kind()) } +} + impl<'u, T> Prevouts<'u, T> where T: Borrow, @@ -1085,10 +1089,6 @@ impl> SighashCache { } } -impl From for Error { - fn from(e: io::Error) -> Self { Error::Io(e.kind()) } -} - /// The `Annex` struct is a slice wrapper enforcing first byte is `0x50`. #[derive(Clone, PartialEq, Eq, Hash, Debug)] pub struct Annex<'a>(&'a [u8]);