projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ce6bcf6
)
`impl Display for NodeId`
author
Matt Corallo
<git@bluematt.me>
Mon, 23 Jan 2023 23:33:19 +0000
(23:33 +0000)
committer
Matt Corallo
<git@bluematt.me>
Mon, 23 Jan 2023 23:39:40 +0000
(23:39 +0000)
`NodeId` is a public key, there's not much reason to not implement
`Display` for it and only `Debug`.
lightning/src/routing/gossip.rs
patch
|
blob
|
history
diff --git
a/lightning/src/routing/gossip.rs
b/lightning/src/routing/gossip.rs
index 1a5b978502c0922c651d6fd3175c67f7ff1897fd..19bde38912aed23ab04b9fbe85690955936e8f20 100644
(file)
--- 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<H: core::hash::Hasher>(&self, hasher: &mut H) {