Skip to content

Commit

Permalink
Add rust switch to solver
Browse files Browse the repository at this point in the history
  • Loading branch information
code-shoily committed Aug 17, 2024
1 parent 6ee7f29 commit 98db404
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mix/tasks/solve.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ defmodule Mix.Tasks.Solve do
def run(args) do
case InputParser.parse(args) do
{year, day} ->
case AdventOfCode.solve(year, day) do
{:ok, {part_1, part_2}} -> Mix.shell().info("Part 1: #{part_1}\tPart 2: #{part_2}")
case AdventOfCode.solve(year, day, false) do
{:ok, {time, {part_1, part_2}}} -> Mix.shell().info("Part 1: #{part_1}\tPart 2: #{part_2}\tTime: #{time} µs")
{:error, :not_yet_solved} -> Mix.shell().error("#{year}/#{day} is not solved yet")
{:error, :invalid_args} -> Mix.shell().error("Invalid year/day: #{year}/#{day}")
end
Expand Down

0 comments on commit 98db404

Please sign in to comment.