diff options
author | Badlop <badlop@process-one.net> | 2022-11-14 13:31:48 +0100 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2022-11-14 18:45:20 +0100 |
commit | d3d50b456ed44ef212576e5ec5336ee817c6ea32 (patch) | |
tree | 3479b80c8721ba9d82a7189b87e553692ec1bdf7 /lib/ejabberd/config | |
parent | Runtime: Add Elixir 1.14 to the test matrix (diff) |
Fix compilation warnings with Elixir 1.14
warning: missing parentheses for expression following "do:" keyword.
Parentheses are required to solve ambiguity inside keywords.
Diffstat (limited to 'lib/ejabberd/config')
-rw-r--r-- | lib/ejabberd/config/logger/ejabberd_logger.ex | 6 | ||||
-rw-r--r-- | lib/ejabberd/config/opts_formatter.ex | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/ejabberd/config/logger/ejabberd_logger.ex b/lib/ejabberd/config/logger/ejabberd_logger.ex index 90970ba73..822571916 100644 --- a/lib/ejabberd/config/logger/ejabberd_logger.ex +++ b/lib/ejabberd/config/logger/ejabberd_logger.ex @@ -17,9 +17,9 @@ defmodule Ejabberd.Config.EjabberdLogger do end defp do_log_errors({:ok, _mod}), do: nil - defp do_log_errors({:error, _mod, errors}), do: Enum.each errors, &do_log_errors/1 - defp do_log_errors({:attribute, errors}), do: Enum.each errors, &log_attribute_error/1 - defp do_log_errors({:dependency, errors}), do: Enum.each errors, &log_dependency_error/1 + defp do_log_errors({:error, _mod, errors}), do: (Enum.each errors, &do_log_errors/1) + defp do_log_errors({:attribute, errors}), do: (Enum.each errors, &log_attribute_error/1) + defp do_log_errors({:dependency, errors}), do: (Enum.each errors, &log_dependency_error/1) defp log_attribute_error({{attr_name, _val}, :attr_not_supported}), do: IO.puts "[ WARN ] Annotation @#{attr_name} is not supported." diff --git a/lib/ejabberd/config/opts_formatter.ex b/lib/ejabberd/config/opts_formatter.ex index b7010ddfe..67887fa4f 100644 --- a/lib/ejabberd/config/opts_formatter.ex +++ b/lib/ejabberd/config/opts_formatter.ex @@ -21,7 +21,7 @@ defmodule Ejabberd.Config.OptsFormatter do end defp format_attrs_for_ejabberd(opts) when is_list(opts), - do: Enum.map opts, &format_attrs_for_ejabberd/1 + do: (Enum.map opts, &format_attrs_for_ejabberd/1) defp format_attrs_for_ejabberd({:listeners, mods}), do: {:listen, format_listeners_for_ejabberd(mods)} |