From 7955cd90e6761476fb4a68789aca0c3a4955bbfa Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Mon, 1 Jul 2024 11:19:15 -0400 Subject: [PATCH] Dialyzer: The guard clause can never succeed. --- lib/pleroma/application_requirements.ex | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/pleroma/application_requirements.ex b/lib/pleroma/application_requirements.ex index 8c0df64fc..a334d12ee 100644 --- a/lib/pleroma/application_requirements.ex +++ b/lib/pleroma/application_requirements.ex @@ -241,10 +241,9 @@ defmodule Pleroma.ApplicationRequirements do missing_mrfs = Enum.reduce(mrfs, [], fn x, acc -> - if Code.ensure_compiled(x) do - acc - else - acc ++ [x] + case Code.ensure_compiled(x) do + {:module, _} -> acc + {:error, _} -> acc ++ [x] end end)