Open alopatindev opened 1 year ago
I might be missing something, but I don't see any place in the code where the minor_units
field is even used.
https://github.com/search?q=repo%3Avarunsrin%2Frusty_money+minor_units&type=code
It's defined for the currencies, but I don't see any code that actually uses it. I only see uses of exponent
. So yeah, I think this field could just be removed, right? Or am I missing something?
Nice job on this library!
(Taking into account that
Currency
isCopy
, so we put all its fields on stack)Currency::minor_units
seems to be redundant, because it can be computed from something likedec!(10).powd(-Currency::exponent)