derekkraan / delta_crdt_ex

Use DeltaCrdt to build distributed applications in Elixir
MIT License
493 stars 36 forks source link

fix spec for timeout parameter #22

Closed flaviogrossi closed 5 years ago

flaviogrossi commented 5 years ago

This fixes dialyzer warnings when used from horde or other projects, since the timeout() type also include the :infinity case.

Without this you would get dialyzer errors like

lib/horde/supervisor_impl.ex:122:call
The call:
DeltaCrdt.mutate(atom(), :remove, [any(), ...], :infinity)

breaks the contract
(
  crdt :: GenServer.server(),
  function :: atom(),
  arguments :: [any()],
  timeout :: pos_integer()
) :: :ok
derekkraan commented 5 years ago

Thanks!!