Added impls of `Bounded` for `i128` and `u128`
This commit is contained in:
parent
bb67a3d03a
commit
f8d1896c6c
|
@ -29,12 +29,16 @@ bounded_impl!(u8, u8::MIN, u8::MAX);
|
|||
bounded_impl!(u16, u16::MIN, u16::MAX);
|
||||
bounded_impl!(u32, u32::MIN, u32::MAX);
|
||||
bounded_impl!(u64, u64::MIN, u64::MAX);
|
||||
#[cfg(feature = "i128")]
|
||||
bounded_impl!(u128, u128::MIN, u128::MAX);
|
||||
|
||||
bounded_impl!(isize, isize::MIN, isize::MAX);
|
||||
bounded_impl!(i8, i8::MIN, i8::MAX);
|
||||
bounded_impl!(i16, i16::MIN, i16::MAX);
|
||||
bounded_impl!(i32, i32::MIN, i32::MAX);
|
||||
bounded_impl!(i64, i64::MIN, i64::MAX);
|
||||
#[cfg(feature = "i128")]
|
||||
bounded_impl!(i128, i128::MIN, i128::MAX);
|
||||
|
||||
impl<T: Bounded> Bounded for Wrapping<T> {
|
||||
fn min_value() -> Self { Wrapping(T::min_value()) }
|
||||
|
@ -89,6 +93,9 @@ fn wrapping_bounded() {
|
|||
}
|
||||
|
||||
test_wrapping_bounded!(usize u8 u16 u32 u64 isize i8 i16 i32 i64);
|
||||
|
||||
#[cfg(feature = "i128")]
|
||||
test_wrapping_bounded!(u128 i128);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in New Issue