Use Self::BITS
in log2
implementation
This commit is contained in:
parent
1d13de6867
commit
6b5acf0d40
@ -465,7 +465,7 @@ macro_rules! nonzero_unsigned_operations {
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
pub const fn log2(self) -> u32 {
|
||||
<$Int>::BITS - 1 - self.leading_zeros()
|
||||
Self::BITS - 1 - self.leading_zeros()
|
||||
}
|
||||
|
||||
/// Returns the base 10 logarithm of the number, rounded down.
|
||||
|
Loading…
x
Reference in New Issue
Block a user