bigint: inline bits() methods
This commit is contained in:
parent
932e45c207
commit
5c3d759d6c
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue