rebalance-app icon indicating copy to clipboard operation
rebalance-app copied to clipboard

Exception thrown when parsing numbers with thousands comma separators

Open LiamAttClarke opened this issue 6 years ago • 1 comments

If you try to run the app with a contribution amount that contains a comma thousands separator (i.e. 10,000) you will get the following exception:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseFloatError { kind: Invalid }', src\libcore\result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

The same error occurs if any number within the portfolio.csv or targets.csv has a comma separated number.

Fund A, $40000
Fund B, $40,000 <-- 😢
Fund C, $1000

LiamAttClarke avatar Jun 20 '19 23:06 LiamAttClarke

@LiamAttClarke thanks Liam! I'll see if I can add in some sort of currency-like parser.

dashed avatar Jun 21 '19 00:06 dashed