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: ACKfd90c8782a
apoelstra: ACK fd90c8782ab602861a715c72ca1481ed963e5c39; successfully ran local tests Tree-SHA512: 2d04da9bddd58040972942e70096b2714405740236889f0909c00cb6993e38f3ae51ff05bbda13792a31243d3598f5976649590eecb0572c4f00c166f717399d
This commit is contained in:
commit
5ecb8880f1
|
@ -118,7 +118,7 @@ impl FeeRate {
|
|||
/// [`NumOpResult::Error`] if an overflow occurred.
|
||||
///
|
||||
/// 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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue