From 3fbe8ada93f7da0d004acb0a8671ae5b009c06eb Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 27 Jan 2024 10:28:49 -0500 Subject: [PATCH] Pleroma.ReverseProxy: dialyzer errors lib/pleroma/reverse_proxy.ex:225:pattern_match The pattern can never match the type. Pattern: :done Type: {:ok, :no_duration_limit, :no_duration_limit} lib/pleroma/reverse_proxy.ex:226:pattern_match The pattern can never match the type. Pattern: {:error, _error} Type: {:ok, :no_duration_limit, :no_duration_limit} lib/pleroma/reverse_proxy.ex:391:pattern_match The pattern can never match the type. Pattern: __duration = nil, _max Type: integer(), _ --- lib/pleroma/reverse_proxy.ex | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/pleroma/reverse_proxy.ex b/lib/pleroma/reverse_proxy.ex index ec7732946..35b0e608c 100644 --- a/lib/pleroma/reverse_proxy.ex +++ b/lib/pleroma/reverse_proxy.ex @@ -388,8 +388,6 @@ defp body_size_constraint(size, limit) when is_integer(limit) and limit > 0 and defp body_size_constraint(_, _), do: :ok - defp check_read_duration(nil = _duration, max), do: check_read_duration(@max_read_duration, max) - defp check_read_duration(duration, max) when is_integer(duration) and is_integer(max) and max > 0 do if duration > max do @@ -407,10 +405,6 @@ defp increase_read_duration({previous_duration, started}) {:ok, previous_duration + duration} end - defp increase_read_duration(_) do - {:ok, :no_duration_limit, :no_duration_limit} - end - defp client, do: Pleroma.ReverseProxy.Client.Wrapper defp track_failed_url(url, error, opts) do