Skip to content

Commit eb3f916

Browse files
committed
chore: cleanup function_exported? checks
1 parent f44cee5 commit eb3f916

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/migration_generator/migration_generator.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3227,7 +3227,7 @@ defmodule AshPostgres.MigrationGenerator do
32273227
migration_type(attribute.type, attribute.constraints)
32283228

32293229
type =
3230-
if :erlang.function_exported(repo, :override_migration_type, 1) do
3230+
if function_exported?(repo, :override_migration_type, 1) do
32313231
repo.override_migration_type(type)
32323232
else
32333233
type

lib/sql_implementation.ex

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,7 @@ defmodule AshPostgres.SqlImplementation do
311311
def parameterized_type(type, constraints) do
312312
if Ash.Type.ash_type?(type) do
313313
cast_in_query? =
314-
if function_exported?(Ash.Type, :cast_in_query?, 2) do
315-
Ash.Type.cast_in_query?(type, constraints)
316-
else
317-
Ash.Type.cast_in_query?(type)
318-
end
314+
Ash.Type.cast_in_query?(type, constraints)
319315

320316
if cast_in_query? do
321317
type = Ash.Type.ecto_type(type)

0 commit comments

Comments
 (0)