Skip to content

Commit

Permalink
v0.3.3: dialyzer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
djthread committed Feb 7, 2023
1 parent 5668477 commit 44e1532
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/indexed/managed/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ defmodule Indexed.Managed.Helpers do
alias Ecto.Association.NotLoaded
alias Indexed.Managed, as: M

@typedoc "A 1 or 2-arity function passed to `with_index/2`."
@type with_index_fun :: (Indexed.t() -> any) | (Indexed.t(), module -> any)

@typep assoc_spec :: M.assoc_spec()
@typep id :: Indexed.id()
@typep record :: Indexed.record()
Expand All @@ -24,7 +27,7 @@ defmodule Indexed.Managed.Helpers do
Given state, wrapped state, or a module, invoke `fun` with the
`t:Indexed.t/0`. If a module is given, use the index from its `__index__/0`.
"""
@spec with_index(M.state_or_module(), (Indexed.t() -> any)) :: any
@spec with_index(M.state_or_module(), with_index_fun) :: any
def with_index(%{managed: state} = som, fun),
do: %{som | managed: with_index(state, fun)}

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Indexed.MixProject do
use Mix.Project

@source_url "https://github.com/djthread/indexed"
@version "0.3.2"
@version "0.3.3"

def project do
[
Expand Down

0 comments on commit 44e1532

Please sign in to comment.