Browse Source

Make sure PrimInt is actually implemented for the primitive types.

kennytm 10 years ago
parent
commit
fd86a2c531
1 changed files with 2 additions and 8 deletions
  1. 2 8
      src/traits.rs

+ 2 - 8
src/traits.rs

@@ -677,14 +677,6 @@ pub trait PrimInt
 macro_rules! prim_int_impl {
     ($($T:ty)*) => ($(
         impl PrimInt for $T {
-            fn min_value() -> Self {
-                <$T>::min_value()
-            }
-
-            fn max_value() -> Self {
-                <$T>::max_value()
-            }
-
             fn count_ones(self) -> u32 {
                 <$T>::count_ones(self)
             }
@@ -736,6 +728,8 @@ macro_rules! prim_int_impl {
     )*)
 }
 
+prim_int_impl!(u8 u16 u32 u64 usize i8 i16 i32 i64 isize);
+
 /// A generic trait for converting a value to a number.
 pub trait ToPrimitive {
     /// Converts the value of `self` to an `isize`.