Increase the number to its max value in the end to ensure it uses the right type

master
Trivernis 5 years ago
parent 4275d53531
commit 7f0bf4b81b

@ -21,6 +21,8 @@ pub fn summation_to<T: PrimInt + Unsigned>(end: T) -> T {
res = res + i;
i = i + T::one();
}
res = T::max_value();
res
}

Loading…
Cancel
Save