Skip to content

Commit

Permalink
add digits_mut to buint
Browse files Browse the repository at this point in the history
  • Loading branch information
krakow10 committed Aug 30, 2024
1 parent d715a3e commit 44b05f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/buint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,13 @@ macro_rules! mod_impl {
&self.digits
}

/// Returns the digits stored in `self` as a mutable array. Digits are little endian (least significant digit first).
#[must_use]
#[inline(always)]
pub fn digits_mut(&mut self) -> &mut [$Digit; N] {
&mut self.digits
}

/// Creates a new unsigned integer from the given array of digits. Digits are stored as little endian (least significant digit first).
#[must_use]
#[inline(always)]
Expand Down

0 comments on commit 44b05f6

Please sign in to comment.