Skip to content

Commit eaad8f5

Browse files
authored
Merge pull request #690 from chuksys/impl-display-for-UserChannelId
Implement Display for UserChannelId
2 parents 22ae4d2 + 2c99aa0 commit eaad8f5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/types.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// http://opensource.org/licenses/MIT>, at your option. You may not use this file except in
66
// accordance with one or both of these licenses.
77

8+
use std::fmt;
89
use std::sync::{Arc, Mutex};
910

1011
use bitcoin::secp256k1::PublicKey;
@@ -192,6 +193,12 @@ impl Readable for UserChannelId {
192193
}
193194
}
194195

196+
impl fmt::Display for UserChannelId {
197+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
198+
write!(f, "UserChannelId({})", self.0)
199+
}
200+
}
201+
195202
/// Details of a channel as returned by [`Node::list_channels`].
196203
///
197204
/// [`Node::list_channels`]: crate::Node::list_channels

0 commit comments

Comments
 (0)