Skip to content

Commit

Permalink
fix: Update callback to match spec (#21)
Browse files Browse the repository at this point in the history
In the `2.0.0` upgrade, we missed updating the `@callback` to match the
`@spec` for throttle, which is causing dialyzer errors when going to
test.
  • Loading branch information
jondthomas authored Oct 3, 2023
1 parent 82647cc commit 5902653
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/buffy/throttle.ex
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ defmodule Buffy.Throttle do
@type state :: {key(), args()}

@doc """
A function to call the throttle. This will always return a tuple of `{:ok, pid()}`
A function to call the throttle. This will start
and wait the configured `throttle` time before calling the `c:handle_throttle/1`
function.
"""
@callback throttle(args :: args()) :: {:ok, pid()}
@callback throttle(args :: args()) :: :ok | {:error, term()}

@doc """
The function called after the throttle has completed. This function will
Expand Down

0 comments on commit 5902653

Please sign in to comment.