Преглед на файлове

Added impls of `Zero` and `One` for `i128` and `u128`

Vincent Esche преди 7 години
родител
ревизия
62723f6f3a
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      src/identities.rs

+ 8 - 0
src/identities.rs

@@ -41,12 +41,16 @@ zero_impl!(u8,    0u8);
 zero_impl!(u16,   0u16);
 zero_impl!(u32,   0u32);
 zero_impl!(u64,   0u64);
+#[cfg(feature = "i128")]
+zero_impl!(u128,  0u128);
 
 zero_impl!(isize, 0isize);
 zero_impl!(i8,    0i8);
 zero_impl!(i16,   0i16);
 zero_impl!(i32,   0i32);
 zero_impl!(i64,   0i64);
+#[cfg(feature = "i128")]
+zero_impl!(i128,  0i128);
 
 zero_impl!(f32, 0.0f32);
 zero_impl!(f64, 0.0f64);
@@ -105,12 +109,16 @@ one_impl!(u8,    1u8);
 one_impl!(u16,   1u16);
 one_impl!(u32,   1u32);
 one_impl!(u64,   1u64);
+#[cfg(feature = "i128")]
+one_impl!(u64,   1u128);
 
 one_impl!(isize, 1isize);
 one_impl!(i8,    1i8);
 one_impl!(i16,   1i16);
 one_impl!(i32,   1i32);
 one_impl!(i64,   1i64);
+#[cfg(feature = "i128")]
+one_impl!(i64,   1i128);
 
 one_impl!(f32, 1.0f32);
 one_impl!(f64, 1.0f64);