varunsrin / rusty_money

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

Idiomatic str #37

Closed bheylin closed 3 years ago

bheylin commented 3 years ago

Hi, I've started using rusty_money on a work project and have come across a number of improvements that i want to make. To get into the swing of things, I want to change the String arguments to the more idiomatic &str as this avoids the caller having to convert to String when using literals etc call_func("literal".into()) and also avoids unnecessary heap allocations.

varunsrin commented 3 years ago

thanks for the change - since it breaks the API, I'll roll this into the next non-patch release.

varunsrin commented 3 years ago

Thanks for the suggestion @ObsceneGiraffe, I rolled this into a refactor I was doing with the 0.4.0 release.