Dialyzer: pattern can never match the type because it is covered by previous clauses.

This commit is contained in:
Mark Felder 2024-07-01 10:58:22 -04:00
parent 33fa035c31
commit 69482004fc
8 changed files with 0 additions and 15 deletions

View File

@ -43,10 +43,6 @@ defmodule Pleroma.Frontend do
{:download_or_unzip, _} -> {:download_or_unzip, _} ->
Logger.info("Could not download or unzip the frontend") Logger.info("Could not download or unzip the frontend")
{:error, "Could not download or unzip the frontend"} {:error, "Could not download or unzip the frontend"}
_e ->
Logger.info("Could not install the frontend")
{:error, "Could not install the frontend"}
end end
end end

View File

@ -1661,7 +1661,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
}} }}
else else
{:error, _} = e -> e {:error, _} = e -> e
e -> {:error, e}
end end
end end

View File

@ -137,7 +137,6 @@ defmodule Pleroma.Web.ActivityPub.MRF.NsfwApiPolicy do
{:ok, object} {:ok, object}
else else
{:nsfw, _data} -> handle_nsfw(object) {:nsfw, _data} -> handle_nsfw(object)
_ -> {:reject, "NSFW: Attachment rejected"}
end end
end end

View File

@ -222,7 +222,6 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
else else
{:reject, nil} -> {:reject, "[SimplePolicy]"} {:reject, nil} -> {:reject, "[SimplePolicy]"}
{:reject, _} = e -> e {:reject, _} = e -> e
_ -> {:reject, "[SimplePolicy]"}
end end
end end
@ -238,7 +237,6 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
else else
{:reject, nil} -> {:reject, "[SimplePolicy]"} {:reject, nil} -> {:reject, "[SimplePolicy]"}
{:reject, _} = e -> e {:reject, _} = e -> e
_ -> {:reject, "[SimplePolicy]"}
end end
end end
@ -251,7 +249,6 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
else else
{:reject, nil} -> {:reject, "[SimplePolicy]"} {:reject, nil} -> {:reject, "[SimplePolicy]"}
{:reject, _} = e -> e {:reject, _} = e -> e
_ -> {:reject, "[SimplePolicy]"}
end end
end end

View File

@ -31,7 +31,6 @@ defmodule Pleroma.Web.ActivityPub.MRF.VocabularyPolicy do
{:reject, _} = e -> e {:reject, _} = e -> e
{:accepted, _} -> {:reject, "[VocabularyPolicy] #{message_type} not in accept list"} {:accepted, _} -> {:reject, "[VocabularyPolicy] #{message_type} not in accept list"}
{:rejected, _} -> {:reject, "[VocabularyPolicy] #{message_type} in reject list"} {:rejected, _} -> {:reject, "[VocabularyPolicy] #{message_type} in reject list"}
_ -> {:reject, "[VocabularyPolicy]"}
end end
end end

View File

@ -46,7 +46,6 @@ defmodule Pleroma.Web.AdminAPI.InviteController do
render(conn, "show.json", invite: updated_invite) render(conn, "show.json", invite: updated_invite)
else else
nil -> {:error, :not_found} nil -> {:error, :not_found}
error -> error
end end
end end

View File

@ -611,7 +611,6 @@ defmodule Pleroma.Web.CommonAPI do
Utils.update_report_state(activity, state) Utils.update_report_state(activity, state)
else else
nil -> {:error, :not_found} nil -> {:error, :not_found}
_ -> {:error, dgettext("errors", "Could not update state")}
end end
end end

View File

@ -207,9 +207,6 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
{:error, changeset} -> {:error, changeset} ->
{_, {error, _}} = Enum.at(changeset.errors, 0) {_, {error, _}} = Enum.at(changeset.errors, 0)
json(conn, %{error: "New password #{error}."}) json(conn, %{error: "New password #{error}."})
_ ->
json(conn, %{error: "Unable to change password."})
end end
{:error, msg} -> {:error, msg} ->