improvement: improve marshalling of spitfire env to macro env
Some checks failed
CI / ash-ci (push) Has been cancelled

This commit is contained in:
Zach Daniel 2024-06-15 14:24:45 -04:00
parent afbcb3cd1a
commit 019add50de

View file

@ -543,8 +543,7 @@ defmodule Igniter.Code.Common do
|> Spitfire.Env.expand("file.ex") |> Spitfire.Env.expand("file.ex")
|> elem(3) |> elem(3)
|> then(fn value -> |> then(fn value ->
# makes dialyzer happy? {:ok, struct(Macro.Env, value)}
{:ok, Map.take(value, Map.keys(%Macro.Env{}))}
end) end)
rescue rescue
_e -> _e ->