From 869b71dccf1b6d22895067d461a408ac37012a26 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 23 Jan 2023 23:33:19 +0000 Subject: [PATCH] `impl Display for NodeId` `NodeId` is a public key, there's not much reason to not implement `Display` for it and only `Debug`. --- lightning/src/routing/gossip.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lightning/src/routing/gossip.rs b/lightning/src/routing/gossip.rs index 1a5b9785..19bde389 100644 --- a/lightning/src/routing/gossip.rs +++ b/lightning/src/routing/gossip.rs @@ -84,6 +84,11 @@ impl fmt::Debug for NodeId { write!(f, "NodeId({})", log_bytes!(self.0)) } } +impl fmt::Display for NodeId { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", log_bytes!(self.0)) + } +} impl core::hash::Hash for NodeId { fn hash(&self, hasher: &mut H) { -- 2.30.2