From 609955f6b30ac90324710fa403d736d0d568194f Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Thu, 9 Jul 2020 09:53:55 -0400 Subject: [PATCH] Don't implement Floor, Ceil and Round on integer types. I can't see a reason to have it. --- src/num.rs | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/num.rs b/src/num.rs index f9123227..319270f7 100644 --- a/src/num.rs +++ b/src/num.rs @@ -70,28 +70,6 @@ pub trait Ceil: Copy { fn ceil(self) -> Self; } -macro_rules! num_int { - ($ty:ty) => { - impl Round for $ty { - #[inline] - fn round(self) -> $ty { - self - } - } - impl Floor for $ty { - #[inline] - fn floor(self) -> $ty { - self - } - } - impl Ceil for $ty { - #[inline] - fn ceil(self) -> $ty { - self - } - } - }; -} macro_rules! num_float { ($ty:ty) => { impl Round for $ty { @@ -114,14 +92,5 @@ macro_rules! num_float { } }; } - -num_int!(i16); -num_int!(u16); -num_int!(i32); -num_int!(u32); -num_int!(i64); -num_int!(u64); -num_int!(isize); -num_int!(usize); num_float!(f32); num_float!(f64);