switch from ToString to Display for ShortChannelId

This commit is contained in:
daywalker90 2023-09-11 00:15:26 +02:00 committed by Vincenzo Palazzo
parent 5f664dac77
commit eda6a4b44a

View file

@ -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 {