Add a Number type for i32

This commit is contained in:
Gwilym Kuiper 2021-06-05 21:43:54 +01:00
parent 174517fbb1
commit 54e28f5dd4

View file

@ -73,6 +73,8 @@ fixed_width_signed_integer_impl!(i32);
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct Num<I: FixedWidthUnsignedInteger, const N: usize>(I);
pub type Number<const N: usize> = Num<i32, N>;
pub fn change_base<I: FixedWidthUnsignedInteger, const N: usize, const M: usize>(
num: Num<I, N>,
) -> Num<I, M> {