Skip to content

Commit 869b71d

Browse files
committed
impl Display for NodeId
`NodeId` is a public key, there's not much reason to not implement `Display` for it and only `Debug`.
1 parent ce6bcf6 commit 869b71d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lightning/src/routing/gossip.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ impl fmt::Debug for NodeId {
8484
write!(f, "NodeId({})", log_bytes!(self.0))
8585
}
8686
}
87+
impl fmt::Display for NodeId {
88+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
89+
write!(f, "{}", log_bytes!(self.0))
90+
}
91+
}
8792

8893
impl core::hash::Hash for NodeId {
8994
fn hash<H: core::hash::Hasher>(&self, hasher: &mut H) {

0 commit comments

Comments
 (0)