Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
sodapopcan committed Jun 29, 2024
1 parent 522469e commit 635eb37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/recode/task/unnecessary_if_unless.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule Recode.Task.UnnecessaryIfUnless do
|> Source.get(:quoted)
|> Zipper.zip()
|> Zipper.traverse([], fn zipper, issues ->
collapse_redundant_booleans(zipper, issues, opts[:autocorrect])
remove_unecessary_if_unless(zipper, issues, opts[:autocorrect])
end)

case opts[:autocorrect] do
Expand All @@ -43,7 +43,7 @@ defmodule Recode.Task.UnnecessaryIfUnless do
end
end

defp collapse_redundant_booleans(
defp remove_unecessary_if_unless(
%Zipper{node: {conditional, meta, body}} = zipper,
issues,
true
Expand All @@ -60,7 +60,7 @@ defmodule Recode.Task.UnnecessaryIfUnless do
end
end

defp collapse_redundant_booleans(
defp remove_unecessary_if_unless(
%Zipper{node: {conditional, meta, body}} = zipper,
issues,
false
Expand All @@ -80,7 +80,7 @@ defmodule Recode.Task.UnnecessaryIfUnless do
{zipper, issues}
end

defp collapse_redundant_booleans(zipper, issues, _autocorrect), do: {zipper, issues}
defp remove_unecessary_if_unless(zipper, issues, _autocorrect), do: {zipper, issues}

defp extract(
[
Expand Down

0 comments on commit 635eb37

Please sign in to comment.