Pleroma.Web.MastodonAPI.StatusView: dialyzer error

lib/pleroma/web/mastodon_api/views/status_view.ex:799:pattern_match_cov
The pattern
_, _

can never match, because previous clauses completely cover the type

  %URI{
    :authority => URI.authority(),
    :fragment => nil | binary(),
    :host => nil | binary(),
    :path => nil | binary(),
    :port => nil | char(),
    :query => nil | binary(),
    :scheme => nil | binary(),
    :userinfo => nil | binary()
  },
  %URI{
    :authority => URI.authority(),
    :fragment => nil | binary(),
    :host => nil | binary(),
    :path => nil | binary(),
    :port => nil | char(),
    :query => nil | binary(),
    :scheme => nil | binary(),
    :userinfo => nil | binary()
  }
.
This commit is contained in:
Mark Felder 2024-01-29 17:42:39 -05:00
parent a266492776
commit 3cb2807244
1 changed files with 0 additions and 2 deletions

View File

@ -796,8 +796,6 @@ defp build_image_url(%URI{} = image_url_data, %URI{} = page_url_data) do
URI.merge(page_url_data, image_url_data) |> to_string URI.merge(page_url_data, image_url_data) |> to_string
end end
defp build_image_url(_, _), do: nil
defp get_source_text(%{"content" => content} = _source) do defp get_source_text(%{"content" => content} = _source) do
content content
end end