use super::HasZero;
pub trait ZeroConst: HasZero {
const ZERO: Self;
}
macro_rules! impl_zero_const {
($($ty:ty),+ $(,)?) => {
$(
impl ZeroConst for $ty {
const ZERO: Self = 0 as $ty;
}
)+
};
}
impl_zero_const!(i8, i16, i32, i64, i128, isize);
impl_zero_const!(u8, u16, u32, u64, u128, usize);
impl_zero_const!(f32, f64);