xavier / xlsx_reader

A production-ready XLSX file reader for Elixir.
105 stars 17 forks source link

Support for :decimal 2.0 dependency #8

Closed patrykwozinski closed 4 years ago

xavier commented 4 years ago

Thanks! 👍

Before we can really claim that this library supports Decimal 2.0, there's a small change to be made to XlsxReader.Conversion.to_decimal/1 to support the value returned by Decimal.parse/1 in Decimal 2.0.

Instead of returning {:ok, value}, it now returns {value, binary} like Float.parse/1 or Integer.parse/2.

We should make sure our conversion function behaves consistently with both Decimal 1.x and Decimal 2.x and returns our expected success tuple {:ok, value}.

patrykwozinski commented 4 years ago

@xavier thanks a lot for a fast answer. I've added this small change to keep consistency with the return of the to_decimal function.

4e9692d387f1fcc4c0dfd76ae16059a24285d8ff <- please verify if it's okay in your standard (I'm Elixir newbie).

xavier commented 4 years ago

👍