Skip to content

Commit

Permalink
switch from ToString to Display for ShortChannelId
Browse files Browse the repository at this point in the history
  • Loading branch information
daywalker90 authored and vincenzopalazzo committed Oct 24, 2023
1 parent 5f664da commit eda6a4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cln-rpc/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit eda6a4b

Please sign in to comment.