Skip to content

Commit d4ffb23

Browse files
Update scala3-library to 3.7.3 (#49)
* Update scala3-library to 3.7.3 * if/then/else fix --------- Co-authored-by: horothesun-scala-steward[bot] <132169906+horothesun-scala-steward[bot]@users.noreply.github.com> Co-authored-by: horothesun <horothesun@gmail.com>
1 parent 9e2d1b0 commit d4ffb23

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ lazy val root = project
2727
.settings(
2828
organization := "com.horothesun",
2929
name := "advent-of-code-2024",
30-
scalaVersion := "3.7.2",
30+
scalaVersion := "3.7.3",
3131
libraryDependencies ++= Seq(
3232
"org.typelevel" %% "cats-core" % catsVersion,
3333
"org.typelevel" %% "kittens" % kittensVersion,

src/main/scala/Day02.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ object Day02:
4242
case _ :: tail => ls.zip(tail).forall((l, r) => l.differsFrom(min = 1, max = 3)(r))
4343

4444
def safety(ls: List[Level]): Safety =
45-
if ((isAllIncreasing(ls) || isAllDecreasing(ls)) && areAllDeltasBetween1And3(ls)) Safe else Unsafe
45+
if (isAllIncreasing(ls) || isAllDecreasing(ls)) && areAllDeltasBetween1And3(ls) then Safe else Unsafe
4646

4747
extension [A](nel: NonEmptyList[A])
4848
def removed(elementAt: Int): List[A] =
4949
val as = nel.toList
50-
if (elementAt < 0 || nel.length <= elementAt) as
50+
if elementAt < 0 || nel.length <= elementAt then as
5151
else // 0 <= idx && idx < nel.length
5252
as.take(elementAt) ++ as.drop(1 + elementAt)
5353

0 commit comments

Comments
 (0)