bigint: inline bits() methods

This commit is contained in:
Josh Stone 2016-08-10 22:23:28 -07:00
parent 932e45c207
commit 5c3d759d6c
2 changed files with 2 additions and 0 deletions

View File

@ -1068,6 +1068,7 @@ impl BigInt {
/// Determines the fewest bits necessary to express the `BigInt`,
/// not including the sign.
#[inline]
pub fn bits(&self) -> usize {
self.data.bits()
}

View File

@ -1049,6 +1049,7 @@ impl BigUint {
}
/// Determines the fewest bits necessary to express the `BigUint`.
#[inline]
pub fn bits(&self) -> usize {
if self.is_zero() {
return 0;