Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix warnings by conditionally compiling Decimal support
This fixes the following Elixir 1.17 warnings when `:decimal` isn't included in the dependency list: ``` ==> jason warning: Decimal.new/1 is undefined (module Decimal is not available or is yet to be defined) │ 94 │ decimal.new(string) │ ~ │ └─ (jason 1.4.3) lib/decoder.ex:94:17: Jason.Decoder.float_decode_function/1 warning: struct Decimal.Error is undefined (module Decimal.Error is not available or is yet to be defined) └─ (jason 1.4.3) lib/decoder.ex: Jason.Decoder.float_decode_function/1 warning: Decimal.to_string/2 is undefined (module Decimal is not available or is yet to be defined) │ 242 │ [?", decimal.to_string(value, :normal), ?"] │ ~ │ └─ (jason 1.4.3) lib/encode.ex:242:18: Jason.Encode.struct/4 warning: Decimal.to_string/1 is undefined (module Decimal is not available or is yet to be defined) │ 231 │ [?", decimal.to_string(value), ?"] │ ~ │ └─ (jason 1.4.3) lib/encoder.ex:231:18: Jason.Encoder.Decimal.encode/2 ```
- Loading branch information