varunsrin / rusty_money

Money library for Rust
MIT License
88 stars 33 forks source link

fix: remove unnessecary move from convert method #76

Closed affanshahid closed 1 year ago

affanshahid commented 2 years ago

ExchangeRate::convert moves the amount parameter even though it doesn't need to. Changed this to an immutable reference to prevent unnecessary moves/clones in user code.

varunsrin commented 1 year ago

good catch, thanks!