From 7f50fa1ce4d6428e6cf47cb1f937431058dd1078 Mon Sep 17 00:00:00 2001 From: Thanh Le Date: Sat, 28 Dec 2024 21:09:10 +0700 Subject: [PATCH] Bump scalafmt 3.8.4-RC4 --- .scalafmt.conf | 2 +- lila/src/main/scala/HeapSort.scala | 3 ++- lila/src/main/scala/StringOps.scala | 2 +- lila/src/test/scala/WMMatchingTest.scala | 3 +-- playJson/src/main/scala/Json.scala | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 0b95cca..d0d3e1b 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.8.3" +version = "3.8.4-RC4" runner.dialect = scala3 align.preset = more diff --git a/lila/src/main/scala/HeapSort.scala b/lila/src/main/scala/HeapSort.scala index 33bc498..522d96d 100644 --- a/lila/src/main/scala/HeapSort.scala +++ b/lila/src/main/scala/HeapSort.scala @@ -21,7 +21,8 @@ object HeapSort: * should be used for small nb and large n * Complexity: O(n + nb * log(n)) */ - def topN[T, C](xs: IterableOnce[T], nb: Int)(using ord: Ordering[T])(using + def topN[T, C](xs: IterableOnce[T], nb: Int)(using + ord: Ordering[T], bf: BuildFrom[xs.type, T, C] ): C = val p = PriorityQueue.from(xs)(ord) diff --git a/lila/src/main/scala/StringOps.scala b/lila/src/main/scala/StringOps.scala index f197bdd..7bf120b 100644 --- a/lila/src/main/scala/StringOps.scala +++ b/lila/src/main/scala/StringOps.scala @@ -1,7 +1,7 @@ package scalalib import java.text.Normalizer -import java.lang.Character.{ UnicodeBlock as Block } +import java.lang.Character.UnicodeBlock as Block object StringOps: diff --git a/lila/src/test/scala/WMMatchingTest.scala b/lila/src/test/scala/WMMatchingTest.scala index 9ea8130..ec4bf04 100644 --- a/lila/src/test/scala/WMMatchingTest.scala +++ b/lila/src/test/scala/WMMatchingTest.scala @@ -32,8 +32,7 @@ class WMMatchingTest extends munit.FunSuite: def checkScore(ans: (Int, Int)): Boolean = res == ans assert(WMMatching(v, pairScore) match case Success(l) => checkScore(score(l)) - case Failure(_) => false - ) + case Failure(_) => false) test("create S-blossom and use it for augmentation"): check0(Array((1, 2, 8), (1, 3, 9), (2, 3, 10), (3, 4, 7)), false, List(-1, 2, 1, 4, 3)) diff --git a/playJson/src/main/scala/Json.scala b/playJson/src/main/scala/Json.scala index 4ac69c8..def50a7 100644 --- a/playJson/src/main/scala/Json.scala +++ b/playJson/src/main/scala/Json.scala @@ -20,7 +20,7 @@ object Json: bts: SameRuntime[A, T], stb: SameRuntime[T, A], format: Format[A] - ) => NotGiven[NoJsonHandler[T]] => Format[T] = + ) => NotGiven[NoJsonHandler[T]] => Format[T] = format.bimap(bts.apply, stb.apply) given [A] => (sr: SameRuntime[A, String]) => KeyWrites[A]: