Merge rust-bitcoin/rust-bitcoin#3621: Remove Amount::fmt_value_in
0348801ef3
Remove Amount::fmt_value_in (Shing Him Ng) Pull request description: Saw this mentioned in #3556 Fixes #2952 ACKs for top commit: apoelstra: ACK 0348801ef30d1cdfdc40cd2316671532d4c06141; successfully ran local tests tcharding: ACK0348801ef3
Tree-SHA512: 29a1d230672a22d059d2ef0870e68dec0fe6d6ae9d3fed51275d9b6779d097578a38a514544df11bdf23908c2d8e3c5fd5c6de2e460aab9792770d6b9e396fc6
This commit is contained in:
commit
7f1237572f
|
@ -11,8 +11,8 @@ use core::{default, fmt, ops};
|
|||
use arbitrary::{Arbitrary, Unstructured};
|
||||
|
||||
use super::{
|
||||
fmt_satoshi_in, parse_signed_to_satoshi, split_amount_and_denomination, Amount, Denomination,
|
||||
Display, DisplayStyle, FormatOptions, OutOfRangeError, ParseAmountError, ParseError,
|
||||
parse_signed_to_satoshi, split_amount_and_denomination, Amount, Denomination,
|
||||
Display, DisplayStyle, OutOfRangeError, ParseAmountError, ParseError,
|
||||
};
|
||||
|
||||
/// A signed amount.
|
||||
|
@ -172,15 +172,6 @@ impl SignedAmount {
|
|||
}
|
||||
}
|
||||
|
||||
/// Formats the value of this [`SignedAmount`] in the given denomination.
|
||||
///
|
||||
/// Does not include the denomination.
|
||||
#[rustfmt::skip]
|
||||
#[deprecated(since = "TBD", note = "use `display_in()` instead")]
|
||||
pub fn fmt_value_in(self, f: &mut dyn fmt::Write, denom: Denomination) -> fmt::Result {
|
||||
fmt_satoshi_in(self.unsigned_abs().to_sat(), self.is_negative(), f, denom, false, FormatOptions::default())
|
||||
}
|
||||
|
||||
/// Returns a formatted string representing this [`SignedAmount`] in the given denomination.
|
||||
///
|
||||
/// Does not include the denomination.
|
||||
|
|
|
@ -13,8 +13,8 @@ use ::serde::{Deserialize, Serialize};
|
|||
use arbitrary::{Arbitrary, Unstructured};
|
||||
|
||||
use super::{
|
||||
fmt_satoshi_in, parse_signed_to_satoshi, split_amount_and_denomination, Denomination, Display,
|
||||
DisplayStyle, FormatOptions, OutOfRangeError, ParseAmountError, ParseError, SignedAmount,
|
||||
parse_signed_to_satoshi, split_amount_and_denomination, Denomination, Display,
|
||||
DisplayStyle, OutOfRangeError, ParseAmountError, ParseError, SignedAmount,
|
||||
};
|
||||
#[cfg(feature = "alloc")]
|
||||
use crate::{FeeRate, Weight};
|
||||
|
@ -178,15 +178,6 @@ impl Amount {
|
|||
}
|
||||
}
|
||||
|
||||
/// Formats the value of this [`Amount`] in the given denomination.
|
||||
///
|
||||
/// Does not include the denomination.
|
||||
#[rustfmt::skip]
|
||||
#[deprecated(since = "TBD", note = "use `display_in()` instead")]
|
||||
pub fn fmt_value_in(self, f: &mut dyn fmt::Write, denom: Denomination) -> fmt::Result {
|
||||
fmt_satoshi_in(self.to_sat(), false, f, denom, false, FormatOptions::default())
|
||||
}
|
||||
|
||||
/// Returns a formatted string representing this [`Amount`] in the given denomination.
|
||||
///
|
||||
/// Does not include the denomination.
|
||||
|
|
Loading…
Reference in New Issue