rusty_money icon indicating copy to clipboard operation
rusty_money copied to clipboard

Money library for Rust

Results 36 rusty_money issues
Sort by recently updated
recently updated
newest added

Similar to #74, it's currently not possible to add `Currency` to `BTreeSet` / `BTreeMap`.

Hello :wave: I'm currently using the library, and I think I found a case where a currency symbol is ambiguous. For Singapore currency sign, I think it can be changed...

```rust use rusty_money::{iso, Money}; fn main() { let money = Money::from_str("-0.005", iso::USD).unwrap(); assert_eq!(format!("{money}"), "$0.00"); } ``` Fails with: ``` thread 'main' panicked at 'assertion failed: `(left == right)` left: `"-$0.00"`,...

The conversion to and from string for arithmetic operations between `Money` and `Decimal` are unnecessary and expensive: ``` test money::tests::bench_decimal_direct ... bench: 3 ns/iter (+/- 0) test money::tests::bench_decimal_from_string ... bench:...