From fd86a2c5319171396e50b4311e5d4e3fbb30c1c2 Mon Sep 17 00:00:00 2001 From: kennytm Date: Sun, 5 Apr 2015 02:28:30 +0800 Subject: [PATCH] Make sure PrimInt is actually implemented for the primitive types. --- src/traits.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/traits.rs b/src/traits.rs index 11abbbe..453dc65 100644 --- a/src/traits.rs +++ b/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`.