Skip to content

Commit

Permalink
Make as_limbs_mut const (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-3milabs authored Jan 31, 2025
1 parent d2ccc7e commit cd852ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl<const LIMBS: usize> Int<LIMBS> {
}

/// 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()
}

Expand Down
2 changes: 1 addition & 1 deletion src/uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl<const LIMBS: usize> Uint<LIMBS> {
}

/// 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
}

Expand Down

0 comments on commit cd852ec

Please sign in to comment.