Skip to content

Commit

Permalink
Update callback for conform function
Browse files Browse the repository at this point in the history
Fixes #34
  • Loading branch information
solnic committed Jan 24, 2024
1 parent af297be commit a091885
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/drops/contract.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ defmodule Drops.Contract do
"""
@doc since: "0.1.0"
@callback conform(data :: map()) :: {:ok, map()} | {:error, list()}
@callback conform(data :: map(), keys :: list()) :: {:ok, map()} | {:error, list()}
@callback conform(data :: map(), schema :: Types.Map) :: {:ok, map()} | {:error, list()}

defmacro __using__(opts) do
quote do
Expand All @@ -59,7 +57,6 @@ defmodule Drops.Contract do
conform(data, schema(), path: [])
end

@impl true
def conform(data, %Types.Map{} = schema, path: path) do
case Drops.Type.Validator.validate(schema, data) do
{outcome, {:map, items}} = result ->
Expand All @@ -79,7 +76,6 @@ defmodule Drops.Contract do
end
end

@impl true
def conform(data, %Types.Sum{} = type, path: path) do
case conform(data, type.left, path: path) do
{:ok, output} = success ->
Expand Down

0 comments on commit a091885

Please sign in to comment.