Make change_base function public

This commit is contained in:
Gwilym Kuiper 2021-06-05 16:35:58 +01:00
parent fe0e9f8196
commit 34981ea3dd

View file

@ -6,7 +6,7 @@ use core::{
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub struct Num<const N: usize>(i32);
fn change_base<const N: usize, const M: usize>(num: Num<N>) -> Num<M> {
pub fn change_base<const N: usize, const M: usize>(num: Num<N>) -> Num<M> {
if N < M {
Num(num.0 << (M - N))
} else {