Move From for Error impl

Move the From impl to be below the other code for the error.

Refactor only, no logic changes.
This commit is contained in:
Tobin C. Harding 2023-05-18 16:10:33 +10:00
parent 5f8e0ad67e
commit fe3b1e1140
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 4 additions and 4 deletions

View File

@ -277,6 +277,10 @@ impl std::error::Error for Error {
} }
} }
impl From<io::Error> for Error {
fn from(e: io::Error) -> Self { Error::Io(e.kind()) }
}
impl<'u, T> Prevouts<'u, T> impl<'u, T> Prevouts<'u, T>
where where
T: Borrow<TxOut>, T: Borrow<TxOut>,
@ -1085,10 +1089,6 @@ impl<R: BorrowMut<Transaction>> SighashCache<R> {
} }
} }
impl From<io::Error> for Error {
fn from(e: io::Error) -> Self { Error::Io(e.kind()) }
}
/// The `Annex` struct is a slice wrapper enforcing first byte is `0x50`. /// The `Annex` struct is a slice wrapper enforcing first byte is `0x50`.
#[derive(Clone, PartialEq, Eq, Hash, Debug)] #[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct Annex<'a>(&'a [u8]); pub struct Annex<'a>(&'a [u8]);