25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Fix compilation warnings with Elixir 1.14

warning: missing parentheses for expression following "do:" keyword.
Parentheses are required to solve ambiguity inside keywords.
This commit is contained in:
Badlop 2022-11-14 13:31:48 +01:00
parent 196eca2dc4
commit d3d50b456e
2 changed files with 4 additions and 4 deletions

View File

@ -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."

View File

@ -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)}