Skip to content

Commit 52abd88

Browse files
committed
Add format with migrate
1 parent 7a08413 commit 52abd88

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: lib/2021/day_04.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ defmodule AdventOfCode.Y2021.Day04 do
6565

6666
defp get_winner(board_states) do
6767
Enum.reduce_while(board_states, nil, fn {_, board, rows, cols}, _ ->
68-
5 in rows or (5 in cols && {:halt, board}) || {:cont, nil}
68+
(5 in rows or (5 in cols && {:halt, board})) || {:cont, nil}
6969
end)
7070
end
7171

Diff for: lib/2022/day_12.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ defmodule AdventOfCode.Y2022.Day12 do
9595
end
9696

9797
defp add_edge(point, grid, x, y) do
98-
unless grid[point] - grid[{x, y}] > 1 do
98+
if not (grid[point] - grid[{x, y}] > 1) do
9999
{{x, y}, point}
100100
end
101101
end

Diff for: lib/helpers/generator.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ defmodule AdventOfCode.Helpers.Generator do
4949
end
5050

5151
defp create_file(path, content) do
52-
unless File.exists?(path) do
52+
if !File.exists?(path) do
5353
File.write(path, content)
5454
end
5555
end
@@ -68,7 +68,7 @@ defmodule AdventOfCode.Helpers.Generator do
6868
end
6969

7070
defp create_input_file(path, year, day) do
71-
unless File.exists?(path) do
71+
if !File.exists?(path) do
7272
with {:ok, data} <- fetch_cookie(year, day),
7373
{:ok, file} <- File.open(path, [:write]),
7474
:ok <- IO.write(file, data) do

0 commit comments

Comments
 (0)