Skip to content

Commit

Permalink
Fix warnings on Elixir 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Nov 2, 2023
1 parent 3891481 commit 2fcfefb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

**Cldr Utils from version 2.18.0 requires Elixir 1.11 or later**

## Cldr Utils version 2.24.2

This is the changelog for Cldr Utils v2.24.2 released on November 2nd, 2023. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr_utils/tags)

### Bug Fixes

* Fix depracation warnings for Elixir 1.16.

## Cldr Utils version 2.24.1

This is the changelog for Cldr Utils v2.24.1 released on June 17th, 2023. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr_utils/tags)
Expand Down
2 changes: 1 addition & 1 deletion lib/cldr/utils/digits.ex
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ defmodule Cldr.Digits do
A "compact" representation is returned, so there may be fewer digits returned
than the decimal point location.
"""
def to_digits(0.0), do: {[0], 1, 1}
def to_digits(float_0) when float_0 == 0.0, do: {[0], 1, 1}
def to_digits(0), do: {[0], 1, 1}

def to_digits(float) when is_float(float) do
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Cldr.Utils.MixProject do
use Mix.Project

@version "2.24.1"
@version "2.24.2"
@source_url "https://github.com/elixir-cldr/cldr_utils"

def project do
Expand Down
2 changes: 1 addition & 1 deletion test/http_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defmodule Cldr.Http.Test do
assert {:ok, _headers, _body} = Cldr.Http.get_with_headers({"https://google.com", [{'Accept-Language', '*'}]})
end

if Version.compare(System.version, "1.14.9") == :gt do
if Version.compare(System.version(), "1.14.9") == :gt do
test "Request with connection timeout" do
options = [connection_timeout: 2]

Expand Down
2 changes: 1 addition & 1 deletion test/math/math_rounding_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule Cldr.Math.RoundingTest do
assert Cldr.Math.round(1.235e-4, 3, :half_even) == 0.0
end

for mode <- Cldr.Math.rounding_modes do
for mode <- Cldr.Math.rounding_modes() do
number = 100_000.00
test "rounding 100_000.00 with mode #{inspect mode}" do
assert unquote(number) == Cldr.Math.round(unquote(number), 2, unquote(mode))
Expand Down

0 comments on commit 2fcfefb

Please sign in to comment.