Skip to content

Commit 6b5acf0

Browse files
committedMar 12, 2022
Use Self::BITS in log2 implementation
1 parent 1d13de6 commit 6b5acf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎library/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)
Please sign in to comment.