From 786dce45463489cabaf3e46b748c57058be52710 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Sat, 1 Jun 2024 18:50:20 +0200 Subject: [PATCH] Const masp epoch functions --- crates/core/src/masp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/src/masp.rs b/crates/core/src/masp.rs index cac7dba6cf..c31734a803 100644 --- a/crates/core/src/masp.rs +++ b/crates/core/src/masp.rs @@ -74,7 +74,7 @@ impl MaspEpoch { } /// Returns a 0 masp epoch - pub fn zero() -> Self { + pub const fn zero() -> Self { Self(Epoch(0)) } @@ -85,7 +85,7 @@ impl MaspEpoch { /// Initialize a new masp epoch from the provided one #[cfg(any(test, feature = "testing"))] - pub fn new(epoch: u64) -> Self { + pub const fn new(epoch: u64) -> Self { Self(Epoch(epoch)) } }