]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Impl Display for Outpoint
authorbenthecarman <benthecarman@live.com>
Thu, 5 Oct 2023 19:38:49 +0000 (14:38 -0500)
committerbenthecarman <benthecarman@live.com>
Fri, 6 Oct 2023 03:45:29 +0000 (22:45 -0500)
lightning/src/chain/transaction.rs

index 22e7ec2c2f9eb90fcfaa8f5b754c27540aa854e8..39a0a5449ac7cf1a4f5dc636363b0ad9c0245c6f 100644 (file)
@@ -75,6 +75,12 @@ impl OutPoint {
        }
 }
 
+impl core::fmt::Display for OutPoint {
+       fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+               write!(f, "{}:{}", self.txid, self.index)
+       }
+}
+
 impl_writeable!(OutPoint, { txid, index });
 
 #[cfg(test)]