Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Oct 9, 2024
1 parent 5745f88 commit 1c12ab6
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions main/util/src/mill/util/PromptLogger.scala
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,14 @@ private[mill] object PromptLogger {

private implicit def seqOrdering = new Ordering[Seq[String]] {
def compare(xs: Seq[String], ys: Seq[String]): Int = {
xs.lengthCompare(ys) match {
case 0 =>
val iter = xs.iterator.zip(ys)
while (iter.nonEmpty) {
val (x, y) = iter.next()
if (x > y) return 1
else if (y > x) return -1
}
return 0
case n => n
val iter = xs.iterator.zip(ys)
while (iter.nonEmpty) {
val (x, y) = iter.next()
if (x > y) return 1
else if (y > x) return -1
}

return xs.lengthCompare(ys)
}
}
private val statuses = collection.mutable.SortedMap.empty[Seq[String], Status]
Expand Down

0 comments on commit 1c12ab6

Please sign in to comment.