Fix credo warnings

This commit is contained in:
Ekaterina Vaartis 2019-09-10 22:09:20 +03:00
parent 87057101b0
commit f6d4acc871
1 changed files with 4 additions and 3 deletions

View File

@ -532,7 +532,8 @@ def import_from_fs(conn, _params) do
|> Enum.map(&String.trim/1) |> Enum.map(&String.trim/1)
|> Enum.map(fn line -> |> Enum.map(fn line ->
case String.split(line, ~r/,\s*/) do case String.split(line, ~r/,\s*/) do
# This matches both strings with and without tags and we don't care about tags here # This matches both strings with and without tags
# and we don't care about tags here
[name, file | _] -> [name, file | _] ->
{name, file} {name, file}
@ -543,8 +544,8 @@ def import_from_fs(conn, _params) do
|> Enum.filter(fn x -> not is_nil(x) end) |> Enum.filter(fn x -> not is_nil(x) end)
|> Enum.into(%{}) |> Enum.into(%{})
else else
# If there's no emoji.txt, assume all files that are of certain extensions from the config # If there's no emoji.txt, assume all files
# are emojis and import them all # that are of certain extensions from the config are emojis and import them all
Pleroma.Emoji.make_shortcode_to_file_map( Pleroma.Emoji.make_shortcode_to_file_map(
dir_path, dir_path,
Pleroma.Config.get!([:emoji, :pack_extensions]) Pleroma.Config.get!([:emoji, :pack_extensions])