Skip to content

Commit

Permalink
Add parens to satisfy Elixir 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
bencoppock committed Dec 9, 2024
1 parent efcf4ac commit 03b18a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/speck.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ defmodule Speck do
"""
@spec validate(schema :: module, params :: map) :: {:ok, struct}, {:error, map}
def validate(schema, params) do
opts = [strict: schema.strict]
opts = [strict: schema.strict()]

case do_validate(:map, params, opts, schema.attributes) do
case do_validate(:map, params, opts, schema.attributes()) do
{fields, errors} when errors == %{} ->
struct = struct(schema, fields)
{:ok, struct}
Expand Down

0 comments on commit 03b18a6

Please sign in to comment.