Skip to content

Commit

Permalink
Include alternate formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DanGould committed Jan 5, 2024
1 parent 60db8cb commit 59ffb98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ fn maybe_display_param(writer: &mut impl fmt::Write, key: impl fmt::Display, val
#[rustfmt::skip]
impl<'a, T> fmt::Display for Uri<'a, bitcoin::address::NetworkChecked, T> where for<'b> &'b T: SerializeParams {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if f.alternate() {
write!(f, "bitcoin:{:#}", self.address)?;
}
write!(f, "bitcoin:{}", self.address)?;
}
let mut no_params = true;
let display_amount = self.amount.as_ref().map(|amount| amount.display_in(Denomination::Bitcoin));

Expand Down

0 comments on commit 59ffb98

Please sign in to comment.