Skip to content

Commit

Permalink
Merge pull request #12 from bencoppock/use-parens-to-satisfy-elixir-1-17
Browse files Browse the repository at this point in the history
Add parens to satisfy Elixir 1.17
  • Loading branch information
amclain authored Dec 15, 2024
2 parents efcf4ac + 03b18a6 commit 0ac39c5
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 0ac39c5

Please sign in to comment.