Merge rust-bitcoin/rust-bitcoin#4044: units: Remove alloc from fee module

43a7c66f50 units: Remove alloc from fee module (jrakibi)

Pull request description:

  This PR removes the `alloc` feature gating from fee module

  Closes #3815

ACKs for top commit:
  tcharding:
    ACK 43a7c66f50
  apoelstra:
    ACK 43a7c66f50b663aee503c958c5158127fa0b8d5c; successfully ran local tests; nice!

Tree-SHA512: 645d50cd6cde915972a576d7282a5dfc9aa27a8c3a3b44d3f3eb7a7f066cb3a697bed7e757bc86766498d92cc534607960caf20c90a1ac6fabf9246db4b30249
This commit is contained in:
merge-script 2025-02-15 00:32:56 +00:00
commit e1cb0f1199
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 0 additions and 2 deletions

View File

@ -33,7 +33,6 @@ impl Amount {
/// let fee_rate = amount.checked_div_by_weight_ceil(weight).expect("Division by weight failed");
/// assert_eq!(fee_rate, FeeRate::from_sat_per_kwu(34));
/// ```
#[cfg(feature = "alloc")]
#[must_use]
pub const fn checked_div_by_weight_ceil(self, weight: Weight) -> Option<FeeRate> {
let wu = weight.to_wu();
@ -56,7 +55,6 @@ impl Amount {
/// can be made. See also [`Self::checked_div_by_weight_ceil`].
///
/// Returns [`None`] if overflow occurred.
#[cfg(feature = "alloc")]
#[must_use]
pub const fn checked_div_by_weight_floor(self, weight: Weight) -> Option<FeeRate> {
// No `?` operator in const context.