Skip to content

Commit 0311236

Browse files
rinpatchmaennchen
rinpatch
authored andcommitted
Fix compilation warnings on Ecto 3.2.0
Ecto 3.2.0 defines two new callbacks for types, they provide default implementations for them if the type uses `use Ecto.Type` instead of `@behaviour Ecto.Type`, but this breaks compatibility with anything less than Ecto 3.2.0, so the default implementations are just hardcoded here.
1 parent 98fce08 commit 0311236

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/crontab/cron_expression/ecto_type.ex

+4
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,9 @@ if Code.ensure_compiled?(Ecto.Type) do
7272
end
7373

7474
def dump(_), do: :error
75+
76+
def embed_as(_), do: :self
77+
78+
def equal?(term1, term2), do: term1 == term2
7579
end
7680
end

0 commit comments

Comments
 (0)