Skip to content

Commit

Permalink
fix: address warnings found by elixir 1.18 (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachallaun authored Dec 20, 2024
1 parent 065f7d4 commit 434521e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
11 changes: 1 addition & 10 deletions lib/spitfire.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2575,22 +2575,13 @@ defmodule Spitfire do
# arg
# )
# will have 1 newling due to the newline after the opening paren
defp get_newlines(parser, kind \\ :peek)

defp get_newlines(parser, :peek) do
defp get_newlines(parser) do
case peek_newlines(parser) do
nil -> []
nl -> [newlines: nl]
end
end

defp get_newlines(parser, :current) do
case current_newlines(parser) do
nil -> []
nl -> [newlines: nl]
end
end

defp push_eoe(ast, eoe) do
case ast do
{t, meta, a} when not is_nil(eoe) and t != :-> ->
Expand Down
5 changes: 1 addition & 4 deletions lib/spitfire/env.ex
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,7 @@ defmodule Spitfire.Env do
{:function, module, fun} ->
expand_remote(meta, module, fun, args, state, env)

:error ->
expand_local(meta, fun, args, state, env)

{:error, :not_found} ->
{:error, _} ->
expand_local(meta, fun, args, state, env)
end
end
Expand Down

0 comments on commit 434521e

Please sign in to comment.