From cd852ecbecaa49abf878d1cf6432e2c645c78349 Mon Sep 17 00:00:00 2001 From: Erik <159244975+erik-3milabs@users.noreply.github.com> Date: Fri, 31 Jan 2025 15:59:38 +0100 Subject: [PATCH] Make `as_limbs_mut` const (#757) --- src/int.rs | 2 +- src/uint.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/int.rs b/src/int.rs index 3b3d60ee..bd304ccb 100644 --- a/src/int.rs +++ b/src/int.rs @@ -119,7 +119,7 @@ impl Int { } /// Borrow the limbs of this [`Int`] mutably. - pub fn as_limbs_mut(&mut self) -> &mut [Limb; LIMBS] { + pub const fn as_limbs_mut(&mut self) -> &mut [Limb; LIMBS] { self.0.as_limbs_mut() } diff --git a/src/uint.rs b/src/uint.rs index fe2208d2..d13e1b58 100644 --- a/src/uint.rs +++ b/src/uint.rs @@ -165,7 +165,7 @@ impl Uint { } /// Borrow the limbs of this [`Uint`] mutably. - pub fn as_limbs_mut(&mut self) -> &mut [Limb; LIMBS] { + pub const fn as_limbs_mut(&mut self) -> &mut [Limb; LIMBS] { &mut self.limbs }