Skip to content

Commit 4c8a4f7

Browse files
committed
ScalafmtPlugin: use Ordering.Implicits for Seq
1 parent 537203c commit 4c8a4f7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugin/src/main/scala/org/scalafmt/sbt/ScalafmtPlugin.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@ object ScalafmtPlugin extends AutoPlugin {
137137
updateConfiguration: lm.UpdateConfiguration,
138138
) {
139139
locally {
140-
def cmp[A: Ordering](x: Iterable[A], y: Iterable[A]): Int = Ordering
141-
.Iterable[A].compare(x, y)
140+
import Ordering.Implicits.*
141+
def cmp[A](x: Seq[A], y: Seq[A])(implicit ord: Ordering[Seq[A]]): Int =
142+
ord.compare(x, y)
142143
val curvn = VersionNumber(sbtVersion)
143144
(curvn._1 match {
144145
case Some(1) => Some("1.12.9")

0 commit comments

Comments
 (0)