Merge branch 'cycles-uploads' into 'develop'
Recompilation speedup: use generic types in @spec in Upload.Filter See merge request pleroma/pleroma!3453
This commit is contained in:
commit
99f8605582
@ -15,13 +15,13 @@ defmodule Pleroma.Upload.Filter do
|
|||||||
|
|
||||||
require Logger
|
require Logger
|
||||||
|
|
||||||
@callback filter(Pleroma.Upload.t()) ::
|
@callback filter(upload :: struct()) ::
|
||||||
{:ok, :filtered}
|
{:ok, :filtered}
|
||||||
| {:ok, :noop}
|
| {:ok, :noop}
|
||||||
| {:ok, :filtered, Pleroma.Upload.t()}
|
| {:ok, :filtered, upload :: struct()}
|
||||||
| {:error, any()}
|
| {:error, any()}
|
||||||
|
|
||||||
@spec filter([module()], Pleroma.Upload.t()) :: {:ok, Pleroma.Upload.t()} | {:error, any()}
|
@spec filter([module()], upload :: struct()) :: {:ok, upload :: struct()} | {:error, any()}
|
||||||
|
|
||||||
def filter([], upload) do
|
def filter([], upload) do
|
||||||
{:ok, upload}
|
{:ok, upload}
|
||||||
|
Loading…
Reference in New Issue
Block a user