Skip to content

Commit 0348801

Browse files
committed
Remove Amount::fmt_value_in
1 parent 3870121 commit 0348801

2 files changed

Lines changed: 4 additions & 22 deletions

File tree

units/src/amount/signed.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use core::{default, fmt, ops};
1111
use arbitrary::{Arbitrary, Unstructured};
1212

1313
use super::{
14-
fmt_satoshi_in, parse_signed_to_satoshi, split_amount_and_denomination, Amount, Denomination,
15-
Display, DisplayStyle, FormatOptions, OutOfRangeError, ParseAmountError, ParseError,
14+
parse_signed_to_satoshi, split_amount_and_denomination, Amount, Denomination,
15+
Display, DisplayStyle, OutOfRangeError, ParseAmountError, ParseError,
1616
};
1717

1818
/// A signed amount.
@@ -172,15 +172,6 @@ impl SignedAmount {
172172
}
173173
}
174174

175-
/// Formats the value of this [`SignedAmount`] in the given denomination.
176-
///
177-
/// Does not include the denomination.
178-
#[rustfmt::skip]
179-
#[deprecated(since = "TBD", note = "use `display_in()` instead")]
180-
pub fn fmt_value_in(self, f: &mut dyn fmt::Write, denom: Denomination) -> fmt::Result {
181-
fmt_satoshi_in(self.unsigned_abs().to_sat(), self.is_negative(), f, denom, false, FormatOptions::default())
182-
}
183-
184175
/// Returns a formatted string representing this [`SignedAmount`] in the given denomination.
185176
///
186177
/// Does not include the denomination.

units/src/amount/unsigned.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use ::serde::{Deserialize, Serialize};
1313
use arbitrary::{Arbitrary, Unstructured};
1414

1515
use super::{
16-
fmt_satoshi_in, parse_signed_to_satoshi, split_amount_and_denomination, Denomination, Display,
17-
DisplayStyle, FormatOptions, OutOfRangeError, ParseAmountError, ParseError, SignedAmount,
16+
parse_signed_to_satoshi, split_amount_and_denomination, Denomination, Display,
17+
DisplayStyle, OutOfRangeError, ParseAmountError, ParseError, SignedAmount,
1818
};
1919
#[cfg(feature = "alloc")]
2020
use crate::{FeeRate, Weight};
@@ -178,15 +178,6 @@ impl Amount {
178178
}
179179
}
180180

181-
/// Formats the value of this [`Amount`] in the given denomination.
182-
///
183-
/// Does not include the denomination.
184-
#[rustfmt::skip]
185-
#[deprecated(since = "TBD", note = "use `display_in()` instead")]
186-
pub fn fmt_value_in(self, f: &mut dyn fmt::Write, denom: Denomination) -> fmt::Result {
187-
fmt_satoshi_in(self.to_sat(), false, f, denom, false, FormatOptions::default())
188-
}
189-
190181
/// Returns a formatted string representing this [`Amount`] in the given denomination.
191182
///
192183
/// Does not include the denomination.

0 commit comments

Comments
 (0)