varunsrin / rusty_money

Money library for Rust
MIT License
93 stars 34 forks source link

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

Closed PaulDotSH closed 2 years ago

PaulDotSH commented 2 years 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