From fd90c8782ab602861a715c72ca1481ed963e5c39 Mon Sep 17 00:00:00 2001 From: yancy Date: Thu, 8 May 2025 16:53:30 -0500 Subject: [PATCH] Mark method as constant Allow external const calls to access this method --- units/src/fee.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units/src/fee.rs b/units/src/fee.rs index de9e5d6a4..a640f93de 100644 --- a/units/src/fee.rs +++ b/units/src/fee.rs @@ -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 { + pub const fn to_fee(self, weight: Weight) -> NumOpResult { self.checked_mul_by_weight(weight) }