ecto_shorts
ecto_shorts copied to clipboard
remove Ecto.Schema.t as option for first argument in Actions.create
This is the fix for those two dialyzer errors:
lib/actions.ex:173:invalid_contract
The @spec for the function does not match the success typing of the function.
Function:
EctoShorts.Actions.create/3
Success typing:
@spec create(atom(), _, Keyword.t()) :: any()
lib/actions.ex:174:invalid_contract
The @spec for the function does not match the success typing of the function.
Function:
EctoShorts.Actions.create/2
Success typing:
@spec create(atom(), _) :: any()
Explanation: Actions.create calls Actions.create_changeset/2, which in turn calls function_exported?/3 and that one only takes a module as the first argument.