projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a6b49d
)
Upload.Filter: use generic types in @spec
author
Alex Gleason
<alex@alexgleason.me>
Mon, 7 Jun 2021 22:07:40 +0000
(17:07 -0500)
committer
Alex Gleason
<alex@alexgleason.me>
Mon, 7 Jun 2021 22:11:17 +0000
(17:11 -0500)
Speeds up recompilation by reducing compile-time deps
lib/pleroma/upload/filter.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/upload/filter.ex
b/lib/pleroma/upload/filter.ex
index c677d4b9fcb107007ee4ae9fe9d1b00966fc69f9..e5db2fb20c6dbe2340c5491319e77db38e01865b 100644
(file)
--- a/
lib/pleroma/upload/filter.ex
+++ b/
lib/pleroma/upload/filter.ex
@@
-15,13
+15,13
@@
defmodule Pleroma.Upload.Filter do
require Logger
- @callback filter(
Pleroma.Upload.
t()) ::
+ @callback filter(
upload :: struc
t()) ::
{:ok, :filtered}
| {:ok, :noop}
- | {:ok, :filtered,
Pleroma.Upload.
t()}
+ | {:ok, :filtered,
upload :: struc
t()}
| {:error, any()}
- @spec filter([module()],
Pleroma.Upload.t()) :: {:ok, Pleroma.Upload.
t()} | {:error, any()}
+ @spec filter([module()],
upload :: struct()) :: {:ok, upload :: struc
t()} | {:error, any()}
def filter([], upload) do
{:ok, upload}