From eda6a4b44a86dc722a0d3886f6c2f07ba605f648 Mon Sep 17 00:00:00 2001 From: daywalker90 Date: Mon, 11 Sep 2023 00:15:26 +0200 Subject: [PATCH] switch from ToString to Display for ShortChannelId --- cln-rpc/src/primitives.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cln-rpc/src/primitives.rs b/cln-rpc/src/primitives.rs index 35bbca5519ec..038f5955cf6e 100644 --- a/cln-rpc/src/primitives.rs +++ b/cln-rpc/src/primitives.rs @@ -165,9 +165,9 @@ impl FromStr for ShortChannelId { )) } } -impl ToString for ShortChannelId { - fn to_string(&self) -> String { - format!("{}x{}x{}", self.block(), self.txindex(), self.outnum()) +impl Display for ShortChannelId { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "{}x{}x{}", self.block(), self.txindex(), self.outnum()) } } impl ShortChannelId {