From 114de0af4edde18af9cd04c7bd615aab1458c2c6 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Thu, 24 Jun 2021 01:11:54 -0400 Subject: [PATCH] fix: optimize ash type loading --- lib/ash/type/type.ex | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/ash/type/type.ex b/lib/ash/type/type.ex index d822e5ec..9c382fa8 100644 --- a/lib/ash/type/type.ex +++ b/lib/ash/type/type.ex @@ -661,28 +661,22 @@ defmodule Ash.Type do @impl true def type do - storage_type = @parent.storage_type() - - if Ash.Type.ash_type?(storage_type) do - Ash.Type.storage_type(@parent.storage_type()) - else - storage_type - end + @parent.storage_type() end @impl true def cast(term) do - @parent.cast_input(term, Ash.OptionsHelpers.validate!([], @parent.constraints())) + @parent.cast_input(term, []) end @impl true def load(term) do - @parent.cast_stored(term, Ash.OptionsHelpers.validate!([], @parent.constraints())) + @parent.cast_stored(term, []) end @impl true def dump(term) do - @parent.dump_to_native(term, Ash.OptionsHelpers.validate!([], @parent.constraints())) + @parent.dump_to_native(term, []) end @impl true