Skip to content

Commit

Permalink
chore(Elixir): Fix warnings emitted by elixir 1.16 (#38)
Browse files Browse the repository at this point in the history
* chore(Elixir): Fix warnings emitted by elixir 1.16

* Fix additional warnings.

---------

Co-authored-by: Benjamin Schultzer <benjamin@schultzer.com>
  • Loading branch information
tomciopp and Schultzer committed Nov 6, 2023
1 parent 8f341fe commit f226c37
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import Config
import_config "#{Mix.env}.exs"
import_config "#{Mix.env()}.exs"
4 changes: 2 additions & 2 deletions lib/cldr/backend.ex
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ defmodule Cldr.Territory.Backend do
def known_territory_subdivisions(territory_code) do
case Cldr.validate_territory(territory_code) do
{:error, reason} -> {:error, reason}
{:ok, territory_code} -> {:ok, Cldr.known_territory_subdivisions[territory_code]}
{:ok, territory_code} -> {:ok, Cldr.known_territory_subdivisions()[territory_code]}
end
end

Expand Down Expand Up @@ -224,7 +224,7 @@ defmodule Cldr.Territory.Backend do
@spec from_territory_code(atom() | String.t() | LanguageTag.t(), Keyword.t()) :: {:ok, String.t()} | {:error, {module(), String.t()}}
def from_territory_code(territory_code, options \\ []) do
with {:ok, code} <- Cldr.validate_territory(territory_code),
{:ok, local} <- Cldr.validate_locale(Keyword.get(options, :locale, Cldr.get_locale), unquote(backend)) do
{:ok, local} <- Cldr.validate_locale(Keyword.get(options, :locale, Cldr.get_locale()), unquote(backend)) do
from_territory_code(code, local.cldr_locale_name, Keyword.get(options, :style, :standard))
else
error -> error
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defmodule Cldr.Territories.Mixfile do
description: description(),
package: package(),
docs: docs(),
start_permanent: Mix.env == :prod,
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
cldr_provider: {Cldr.Territory.Backend, :define_territory_module, []},
Expand Down

0 comments on commit f226c37

Please sign in to comment.