Pleroma.Search.SearchBackend: dialyzer error

Incorrect spec. Both search backends return :ok so that is what should be the spec.

lib/pleroma/search/database_search.ex:56:callback_type_mismatch
Type mismatch for @callback remove_from_index/1 in Pleroma.Search.SearchBackend behaviour.

Expected type:
{:error, _} | {:ok, _}

Actual type:
:ok
This commit is contained in:
Mark Felder 2024-01-26 19:26:11 -05:00
parent 1b40ebfa20
commit e834343496
1 changed files with 1 additions and 1 deletions

View File

@ -20,5 +20,5 @@ defmodule Pleroma.Search.SearchBackend do
is what contains the actual content and there is no need for filtering when removing
from index.
"""
@callback remove_from_index(object :: Pleroma.Object.t()) :: {:ok, any()} | {:error, any()}
@callback remove_from_index(object :: Pleroma.Object.t()) :: :ok | {:error, any()}
end