Skip to content

Commit 82fff24

Browse files
authored
Minor code improvements (#85)
1 parent 22a54ad commit 82fff24

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/trans/translator.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ defmodule Trans.Translator do
182182
end
183183
end
184184

185-
defp translate_fields(%{__struct__: module} = struct, locale, default_locale) when is_list(locale) do
185+
defp translate_fields(%{__struct__: module} = struct, locale, default_locale)
186+
when is_list(locale) do
186187
fields = module.__trans__(:fields)
187188

188189
Enum.reduce(fields, struct, fn field, struct ->
@@ -193,7 +194,7 @@ defmodule Trans.Translator do
193194
end)
194195
end
195196

196-
defp translate_fields(%{__struct__: module} = struct, locale, default_locale) do
197+
defp translate_fields(%{__struct__: _module} = struct, locale, default_locale) do
197198
translate_fields(struct, [locale], default_locale)
198199
end
199200

0 commit comments

Comments
 (0)