aboutsummaryrefslogtreecommitdiff
path: root/src/econf.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/econf.erl')
-rw-r--r--src/econf.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/econf.erl b/src/econf.erl
index 372a8563d..fdb807588 100644
--- a/src/econf.erl
+++ b/src/econf.erl
@@ -198,9 +198,11 @@ format_error({mqtt_codec, Reason}) ->
format_error(Reason) ->
yconf:format_error(Reason).
--spec format_module(atom()) -> string().
+-spec format_module(atom() | string()) -> string().
+format_module(Mod) when is_atom(Mod) ->
+ format_module(atom_to_list(Mod));
format_module(Mod) ->
- case atom_to_list(Mod) of
+ case Mod of
"Elixir." ++ M -> M;
M -> M
end.