Small fixme in core now that NonZero is generic
This commit is contained in:
parent
06c072f158
commit
84474a25a4
@ -483,7 +483,6 @@ impl u8 {
|
||||
Self = u8,
|
||||
ActualT = u8,
|
||||
SignedT = i8,
|
||||
NonZeroT = NonZero<u8>,
|
||||
BITS = 8,
|
||||
MAX = 255,
|
||||
rot = 2,
|
||||
@ -1098,7 +1097,6 @@ impl u16 {
|
||||
Self = u16,
|
||||
ActualT = u16,
|
||||
SignedT = i16,
|
||||
NonZeroT = NonZero<u16>,
|
||||
BITS = 16,
|
||||
MAX = 65535,
|
||||
rot = 4,
|
||||
@ -1147,7 +1145,6 @@ impl u32 {
|
||||
Self = u32,
|
||||
ActualT = u32,
|
||||
SignedT = i32,
|
||||
NonZeroT = NonZero<u32>,
|
||||
BITS = 32,
|
||||
MAX = 4294967295,
|
||||
rot = 8,
|
||||
@ -1171,7 +1168,6 @@ impl u64 {
|
||||
Self = u64,
|
||||
ActualT = u64,
|
||||
SignedT = i64,
|
||||
NonZeroT = NonZero<u64>,
|
||||
BITS = 64,
|
||||
MAX = 18446744073709551615,
|
||||
rot = 12,
|
||||
@ -1195,7 +1191,6 @@ impl u128 {
|
||||
Self = u128,
|
||||
ActualT = u128,
|
||||
SignedT = i128,
|
||||
NonZeroT = NonZero<u128>,
|
||||
BITS = 128,
|
||||
MAX = 340282366920938463463374607431768211455,
|
||||
rot = 16,
|
||||
@ -1221,7 +1216,6 @@ impl usize {
|
||||
Self = usize,
|
||||
ActualT = u16,
|
||||
SignedT = isize,
|
||||
NonZeroT = NonZero<usize>,
|
||||
BITS = 16,
|
||||
MAX = 65535,
|
||||
rot = 4,
|
||||
@ -1246,7 +1240,6 @@ impl usize {
|
||||
Self = usize,
|
||||
ActualT = u32,
|
||||
SignedT = isize,
|
||||
NonZeroT = NonZero<usize>,
|
||||
BITS = 32,
|
||||
MAX = 4294967295,
|
||||
rot = 8,
|
||||
@ -1271,7 +1264,6 @@ impl usize {
|
||||
Self = usize,
|
||||
ActualT = u64,
|
||||
SignedT = isize,
|
||||
NonZeroT = NonZero<usize>,
|
||||
BITS = 64,
|
||||
MAX = 18446744073709551615,
|
||||
rot = 12,
|
||||
|
@ -3,7 +3,6 @@ macro_rules! uint_impl {
|
||||
Self = $SelfT:ty,
|
||||
ActualT = $ActualT:ident,
|
||||
SignedT = $SignedT:ident,
|
||||
NonZeroT = $NonZeroT:ty,
|
||||
|
||||
// There are all for use *only* in doc comments.
|
||||
// As such, they're all passed as literals -- passing them as a string
|
||||
@ -1216,8 +1215,7 @@ pub const fn checked_ilog(self, base: Self) -> Option<u32> {
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
pub const fn checked_ilog2(self) -> Option<u32> {
|
||||
// FIXME: Simply use `NonZero::new` once it is actually generic.
|
||||
if let Some(x) = <$NonZeroT>::new(self) {
|
||||
if let Some(x) = NonZero::new(self) {
|
||||
Some(x.ilog2())
|
||||
} else {
|
||||
None
|
||||
@ -1239,8 +1237,7 @@ pub const fn checked_ilog2(self) -> Option<u32> {
|
||||
without modifying the original"]
|
||||
#[inline]
|
||||
pub const fn checked_ilog10(self) -> Option<u32> {
|
||||
// FIXME: Simply use `NonZero::new` once it is actually generic.
|
||||
if let Some(x) = <$NonZeroT>::new(self) {
|
||||
if let Some(x) = NonZero::new(self) {
|
||||
Some(x.ilog10())
|
||||
} else {
|
||||
None
|
||||
|
Loading…
Reference in New Issue
Block a user