From 03b18a6ef3f58ca5306292a7571069d4dd61ef15 Mon Sep 17 00:00:00 2001 From: Ben Coppock Date: Mon, 9 Dec 2024 15:41:44 -0800 Subject: [PATCH] Add parens to satisfy Elixir 1.17 --- lib/speck.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/speck.ex b/lib/speck.ex index dea88aa..132ddf9 100644 --- a/lib/speck.ex +++ b/lib/speck.ex @@ -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}