expose limbs

This commit is contained in:
dignifiedquire 2018-07-18 01:48:25 +02:00
parent 329aa2f5d4
commit 8572a00c32
2 changed files with 5 additions and 5 deletions

View File

@ -2986,7 +2986,7 @@ impl BigInt {
}
pub fn trailing_zeros(&self) -> Option<usize> {
self.data.trailing_zeros()
biguint::trailing_zeros(&self.data)
}
}

View File

@ -1965,6 +1965,10 @@ impl BigUint {
BigUint::new_native(slice.to_vec())
}
pub fn get_limb(&self, i: usize) -> BigDigit {
self.data[i]
}
/// Assign a value to a `BigUint`.
///
/// The digits are in little-endian base 2<sup>32</sup>.
@ -2319,10 +2323,6 @@ impl BigUint {
pub fn trailing_zeros(&self) -> Option<usize> {
trailing_zeros(self)
}
pub fn get_limb(&self, n: usize) -> BigDigit {
self.data[n]
}
}
/// Returns the number of least-significant bits that are zero,