Skip to content

Commit 434521e

Browse files
authored
fix: address warnings found by elixir 1.18 (#50)
1 parent 065f7d4 commit 434521e

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

lib/spitfire.ex

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,22 +2575,13 @@ defmodule Spitfire do
25752575
# arg
25762576
# )
25772577
# will have 1 newling due to the newline after the opening paren
2578-
defp get_newlines(parser, kind \\ :peek)
2579-
2580-
defp get_newlines(parser, :peek) do
2578+
defp get_newlines(parser) do
25812579
case peek_newlines(parser) do
25822580
nil -> []
25832581
nl -> [newlines: nl]
25842582
end
25852583
end
25862584

2587-
defp get_newlines(parser, :current) do
2588-
case current_newlines(parser) do
2589-
nil -> []
2590-
nl -> [newlines: nl]
2591-
end
2592-
end
2593-
25942585
defp push_eoe(ast, eoe) do
25952586
case ast do
25962587
{t, meta, a} when not is_nil(eoe) and t != :-> ->

lib/spitfire/env.ex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,7 @@ defmodule Spitfire.Env do
316316
{:function, module, fun} ->
317317
expand_remote(meta, module, fun, args, state, env)
318318

319-
:error ->
320-
expand_local(meta, fun, args, state, env)
321-
322-
{:error, :not_found} ->
319+
{:error, _} ->
323320
expand_local(meta, fun, args, state, env)
324321
end
325322
end

0 commit comments

Comments
 (0)