Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-API breaking derives for error & transaction types #558

Merged
merged 1 commit into from Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/blockdata/transaction.rs
Expand Up @@ -173,7 +173,7 @@ impl ::std::str::FromStr for OutPoint {
}

/// A transaction input, which defines old coins to be consumed
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct TxIn {
/// The reference to the previous output that is being used an an input
Expand Down Expand Up @@ -206,7 +206,7 @@ impl Default for TxIn {
}

/// A transaction output, which defines new coins to be created from old ones.
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct TxOut {
/// The value of the output, in satoshis
Expand Down Expand Up @@ -252,7 +252,7 @@ impl Default for TxOut {
///
/// We therefore deviate from the spec by always using the Segwit witness encoding
/// for 0-input transactions, which results in unambiguously parseable transactions.
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Transaction {
/// The protocol version, is currently expected to be 1 or 2 (BIP 68).
Expand Down
2 changes: 0 additions & 2 deletions src/consensus/encode.rs
Expand Up @@ -118,8 +118,6 @@ impl error::Error for Error {
}
}

#[doc(hidden)]

#[doc(hidden)]
impl From<io::Error> for Error {
fn from(error: io::Error) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion src/util/base58.rs
Expand Up @@ -21,7 +21,7 @@ use hashes::{sha256d, Hash};
use util::endian;

/// An error that might occur during base58 decoding
#[derive(Debug, PartialEq, Eq, Clone)]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)]
pub enum Error {
/// Invalid character encountered
BadByte(u8),
Expand Down