We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Self::BITS
log2
1 parent 1d13de6 commit 6b5acf0Copy full SHA for 6b5acf0
library/core/src/num/nonzero.rs
@@ -465,7 +465,7 @@ macro_rules! nonzero_unsigned_operations {
465
without modifying the original"]
466
#[inline]
467
pub const fn log2(self) -> u32 {
468
- <$Int>::BITS - 1 - self.leading_zeros()
+ Self::BITS - 1 - self.leading_zeros()
469
}
470
471
/// Returns the base 10 logarithm of the number, rounded down.
0 commit comments