Merge rust-bitcoin/rust-bitcoin#4474: Mark method as constant

fd90c8782a Mark method as constant (yancy)

Pull request description:

  Allow external const calls to access this method

  Followup from https://github.com/rust-bitcoin/rust-bitcoin/pull/4428

ACKs for top commit:
  tcharding:
    ACK fd90c8782a
  apoelstra:
    ACK fd90c8782ab602861a715c72ca1481ed963e5c39; successfully ran local tests

Tree-SHA512: 2d04da9bddd58040972942e70096b2714405740236889f0909c00cb6993e38f3ae51ff05bbda13792a31243d3598f5976649590eecb0572c4f00c166f717399d
This commit is contained in:
merge-script 2025-05-12 15:01:01 +00:00
commit 5ecb8880f1
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ impl FeeRate {
/// [`NumOpResult::Error`] if an overflow occurred. /// [`NumOpResult::Error`] if an overflow occurred.
/// ///
/// This is equivalent to `Self::checked_mul_by_weight()`. /// This is equivalent to `Self::checked_mul_by_weight()`.
pub fn to_fee(self, weight: Weight) -> NumOpResult<Amount> { pub const fn to_fee(self, weight: Weight) -> NumOpResult<Amount> {
self.checked_mul_by_weight(weight) self.checked_mul_by_weight(weight)
} }