Merge rust-bitcoin/rust-bitcoin#2309: Add the implementation of `Display` for `transaction::Version`

429a3ecec4 Add the implementation of `Display` for `transaction::Version` (harshit933)

Pull request description:

  Adds the implementation of `Display` trait for `transaction::Version`

  fixes #2308

  This is unrelated to the issue but can anyone suggest some good issues that needs to be fixed. I am also taking a look but I am confused as to which I would be able to solve. I am here to learn more.
  Thank you.

ACKs for top commit:
  apoelstra:
    ACK 429a3ecec4 Merry Christmas
  tcharding:
    ACK 429a3ecec4

Tree-SHA512: 9e59a8fe494b01caa8f211441744709f26df03891be171242bea4f7ccd7c3cc58b548cad241cab5270ad66fc9bb33ea7d6f98cc60d496c47647fb3396db9410f
This commit is contained in:
Andrew Poelstra 2024-01-02 16:32:23 +00:00
commit 471da86e5a
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 6 additions and 0 deletions

View File

@ -1030,6 +1030,12 @@ impl Decodable for Version {
} }
} }
impl fmt::Display for Version {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&self.0, f)
}
}
impl_consensus_encoding!(TxOut, value, script_pubkey); impl_consensus_encoding!(TxOut, value, script_pubkey);
impl Encodable for OutPoint { impl Encodable for OutPoint {