pub trait EuclidOps {
fn div_euclid(self, rhs: Self) -> Self;
fn rem_euclid(self, rhs: Self) -> Self;
}
macro_rules! impl_euclid {
($($t:ty),*) => {
$(impl EuclidOps for $t {
#[inline] fn div_euclid(self, rhs: Self) -> Self { self.div_euclid(rhs) }
#[inline] fn rem_euclid(self, rhs: Self) -> Self { self.rem_euclid(rhs) }
})*
};
}
impl_euclid!(u8, u16, u32, u64, u128, usize, i8, i16, i32, i64, i128, isize, f32, f64);