Skip to content

Commit 522a73e

Browse files
committed
Use Self::BITS in log2 implementation
1 parent c2a2f21 commit 522a73e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/num/nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ macro_rules! nonzero_unsigned_operations {
465465
without modifying the original"]
466466
#[inline]
467467
pub const fn log2(self) -> u32 {
468-
<$Int>::BITS - 1 - self.leading_zeros()
468+
Self::BITS - 1 - self.leading_zeros()
469469
}
470470

471471
/// Returns the base 10 logarithm of the number, rounded down.

0 commit comments

Comments
 (0)