Merge pull request #2649 from benthecarman/display-outpoint

Impl Display for Outpoint
This commit is contained in:
Matt Corallo 2023-10-06 19:00:01 +00:00 committed by GitHub
commit 89749eddec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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)]