varunsrin / rusty_money

Money library for Rust
MIT License
85 stars 32 forks source link

Improvement: Use the currency enum instead of a reference to it in ExchangeRate #73

Closed PaulDotSH closed 1 year ago

PaulDotSH commented 1 year ago

ExchangeRate uses references, if you want to have a separate function to get the rates from a third party api and create a vector of exchange rates for all of the currencies you have to return it as static. it is worse in terms of code, usability and even slower because references are usize long isntead of u8