Remove Amount::fmt_value_in
This commit is contained in:
parent
3870121371
commit
0348801ef3
|
@ -11,8 +11,8 @@ use core::{default, fmt, ops};
|
||||||
use arbitrary::{Arbitrary, Unstructured};
|
use arbitrary::{Arbitrary, Unstructured};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
fmt_satoshi_in, parse_signed_to_satoshi, split_amount_and_denomination, Amount, Denomination,
|
parse_signed_to_satoshi, split_amount_and_denomination, Amount, Denomination,
|
||||||
Display, DisplayStyle, FormatOptions, OutOfRangeError, ParseAmountError, ParseError,
|
Display, DisplayStyle, OutOfRangeError, ParseAmountError, ParseError,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// A signed amount.
|
/// 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.
|
/// Returns a formatted string representing this [`SignedAmount`] in the given denomination.
|
||||||
///
|
///
|
||||||
/// Does not include the denomination.
|
/// Does not include the denomination.
|
||||||
|
|
|
@ -13,8 +13,8 @@ use ::serde::{Deserialize, Serialize};
|
||||||
use arbitrary::{Arbitrary, Unstructured};
|
use arbitrary::{Arbitrary, Unstructured};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
fmt_satoshi_in, parse_signed_to_satoshi, split_amount_and_denomination, Denomination, Display,
|
parse_signed_to_satoshi, split_amount_and_denomination, Denomination, Display,
|
||||||
DisplayStyle, FormatOptions, OutOfRangeError, ParseAmountError, ParseError, SignedAmount,
|
DisplayStyle, OutOfRangeError, ParseAmountError, ParseError, SignedAmount,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "alloc")]
|
#[cfg(feature = "alloc")]
|
||||||
use crate::{FeeRate, Weight};
|
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.
|
/// Returns a formatted string representing this [`Amount`] in the given denomination.
|
||||||
///
|
///
|
||||||
/// Does not include the denomination.
|
/// Does not include the denomination.
|
||||||
|
|
Loading…
Reference in New Issue