From Macro to tortured Generic
This commit is contained in:
parent
16741c8c4d
commit
d20cb06c87
@ -52,10 +52,7 @@ impl<T: Unsigned> Frac<T> {
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! impl_mul {
|
||||
($( $Type: ty ),* ) => {
|
||||
$(
|
||||
impl Mul for Frac<$Type> {
|
||||
impl<T: Unsigned + Mul<Output = T>> Mul for Frac<T> {
|
||||
type Output = Self;
|
||||
|
||||
fn mul(self, rhs: Self) -> Self {
|
||||
@ -70,10 +67,6 @@ macro_rules! impl_mul {
|
||||
}
|
||||
}
|
||||
}
|
||||
)*
|
||||
};
|
||||
}
|
||||
impl_mul!(u8, u16, u32, u64, usize, u128);
|
||||
|
||||
impl<T: Unsigned> Neg for Frac<T> {
|
||||
type Output = Self;
|
||||
|
Loading…
Reference in New Issue
Block a user