Verified Commit bdaa1d45 authored by Alex Gleason's avatar Alex Gleason
Browse files

Upload.Filter: use generic types in @spec

Speeds up recompilation by reducing compile-time deps
parent 4a6b49d0
Pipeline #36453 passed with stages
in 7 minutes and 22 seconds
......@@ -15,13 +15,13 @@ defmodule Pleroma.Upload.Filter do
require Logger
@callback filter(Pleroma.Upload.t()) ::
@callback filter(upload :: struct()) ::
{:ok, :filtered}
| {:ok, :noop}
| {:ok, :filtered, Pleroma.Upload.t()}
| {:ok, :filtered, upload :: struct()}
| {: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
{:ok, upload}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment