Skip to content

Commit

Permalink
1.18 warnings + formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
novaugust committed Feb 20, 2025
1 parent 297106a commit ee34edd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/style/deprecations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ defmodule Styler.Style.Deprecations do

defp style(node), do: node

defp rewrite_range_match({:.., dm, [first, {_, m, _} = last]}), do: {:"..//", dm, [first, last, {:_, m, nil}]}
defp rewrite_range_match({:.., dm, [first, {_, m, _} = last]}), do: {:..//, dm, [first, last, {:_, m, nil}]}
defp rewrite_range_match(x), do: x

defp add_step_to_date_range?(first, last) do
Expand All @@ -117,7 +117,7 @@ defmodule Styler.Style.Deprecations do
{:ok, stop} <- extract_value_from_range(last),
true <- start > stop do
step = {:__block__, [token: "1", line: lm[:line]], [1]}
{:"..//", rm, [first, last, step]}
{:..//, rm, [first, last, step]}
else
_ -> range
end
Expand Down
2 changes: 1 addition & 1 deletion lib/style/pipes.ex
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ defmodule Styler.Style.Pipes do

comments =
ctx.comments
|> Style.displace_comments(lhs_line..(rhs_line - 1))
|> Style.displace_comments(lhs_line..(rhs_line - 1)//1)
|> Style.shift_comments(rhs_line..rhs_max_line, shift + 1)

{:cont, Zipper.replace(single_pipe_zipper, {fun, meta, [lhs | args]}), %{ctx | comments: comments}}
Expand Down

0 comments on commit ee34edd

Please sign in to comment.