Skip to content

Commit

Permalink
Fix non-exhaustiveness warning using IllegalArgumentException
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Nov 19, 2023
1 parent 0589719 commit d4e6caf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/scala/eu/sim642/adventofcode2022/Day21.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ object Day21 {
.updatedWith(root)({
// change root to subtraction, so can solve for root == 0
case Some(Job.Operation(lhs, _, rhs)) => Some(Job.Operation(lhs, Op.Sub, rhs))
case _ => throw new IllegalArgumentException("invalid root")
})
.removed(humn)
}
Expand Down

0 comments on commit d4e6caf

Please sign in to comment.