diff --git a/src/types.rs b/src/types.rs index 800d9462d..71512b2cd 100644 --- a/src/types.rs +++ b/src/types.rs @@ -5,6 +5,7 @@ // http://opensource.org/licenses/MIT>, at your option. You may not use this file except in // accordance with one or both of these licenses. +use std::fmt; use std::sync::{Arc, Mutex}; use bitcoin::secp256k1::PublicKey; @@ -192,6 +193,12 @@ impl Readable for UserChannelId { } } +impl fmt::Display for UserChannelId { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "UserChannelId({})", self.0) + } +} + /// Details of a channel as returned by [`Node::list_channels`]. /// /// [`Node::list_channels`]: crate::Node::list_channels