Closed hoodie closed 8 years ago
Wow thanks for the interest. I’ll go ahead and merge your request after updating some documentation.
Concerning the comparison, I think panicking should be done similar to the philosophy of exceptions. That is, panicking should only be done in exceptional cases. For this project I would consider a comparison between two different currencies to be a non-exceptional case, so I will make that change.
It would have been cool for the comparison to do some conversion based on current conversion rates, but the symbol is nothing but a character, so I figured it was out of scope.
Also, just out of curiosity, what are you using this library to make?
I take that back about the comparison not panicking. The overridden comparing methods must return a bool
, so there is no way of returning an Option<bool>
or something to that effect.
Hi, I am writing a little tool for managing invoices, so I need to calculate prices and taxes. I haven't gotten to that point yet though. I might be coming back to you. Thanks for the merge anyway.
Please do, I'd love to get more input on how the currency library works out for you.
Hi there, I would very much like to use your crate. Unfortunately it currently panics a little bit too much. Though I have no idea on whether panicking when comparing € and $ isn't ok, I think at least it should not panic while parsing.
What do you think?