use super::HasTwo;
pub trait Two: HasTwo {
fn two() -> Self;
}
macro_rules! impl_two {
($($ty:ty),+ $(,)?) => {
$(
impl Two for $ty {
fn two() -> Self {
2 as $ty
}
}
)+
};
}
impl_two!(i8, i16, i32, i64, i128, isize);
impl_two!(u8, u16, u32, u64, u128, usize);
impl_two!(f32, f64);