Do not use Enum.map for side-effects
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
588bc656f2
commit
a9b5a28c26
3 changed files with 2 additions and 2 deletions
0
changelog.d/map-side-effects.skip
Normal file
0
changelog.d/map-side-effects.skip
Normal file
|
|
@ -22,7 +22,7 @@ defmodule Mix.Tasks.Pleroma.OpenapiSpec do
|
||||||
else
|
else
|
||||||
{_, errors} ->
|
{_, errors} ->
|
||||||
IO.puts(IO.ANSI.format([:red, :bright, "Spec check failed, errors:"]))
|
IO.puts(IO.ANSI.format([:red, :bright, "Spec check failed, errors:"]))
|
||||||
Enum.map(errors, &IO.puts/1)
|
Enum.each(errors, &IO.puts/1)
|
||||||
|
|
||||||
raise "Spec check failed"
|
raise "Spec check failed"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ defmodule Pleroma.Activity.HTML do
|
||||||
|
|
||||||
def invalidate_cache_for(activity_id) do
|
def invalidate_cache_for(activity_id) do
|
||||||
keys = get_cache_keys_for(activity_id)
|
keys = get_cache_keys_for(activity_id)
|
||||||
Enum.map(keys, &@cachex.del(:scrubber_cache, &1))
|
Enum.each(keys, &@cachex.del(:scrubber_cache, &1))
|
||||||
@cachex.del(:scrubber_management_cache, activity_id)
|
@cachex.del(:scrubber_management_cache, activity_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue