[-] Aethersong@lemmy.world 1 points 3 years ago

You might be able to make num a newtype and make a custom implementation of the Add trait for it that checks that it is in bounds

Aethersong

0 post score
0 comment score
joined 3 years ago