Skip to content

Commit

Permalink
Merge pull request #96 from scala-steward/update/scala-library-2.13.14
Browse files Browse the repository at this point in the history
Update scala-library to 2.13.14
  • Loading branch information
SethTisue authored Jun 4, 2024
2 parents 553cbd9 + 2c782c5 commit e4e44e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lazy val root = project.in(file("."))
.settings(inThisBuild(Seq(
organization := "com.lightbend.benchdb",
//version := "0.1-SNAPSHOT",
scalaVersion := "2.12.19",
scalaVersion := "2.13.14",
scalacOptions ++= Seq("-deprecation", "-unchecked"),
)))
.settings(
Expand Down Expand Up @@ -42,6 +42,7 @@ lazy val plugin = project.in(file("plugin"))
.settings(
name := "sbt-benchdb",
sbtPlugin := true,
scalaVersion := "2.12.19",
buildInfoKeys := Seq[BuildInfoKey](organization, core / name, version, core / scalaVersion),
buildInfoPackage := "com.lightbend.benchdb.sbtplugin",
publishMavenStyle := false,
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/com/lightbend/benchdb/RunResult.scala
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ object RunResult extends Logging {

class ParamOrdering(paramTypes: Seq[(Boolean, Boolean)], nullsFirst: Boolean = false) extends Ordering[Seq[String]]{
def compare(x: Seq[String], y: Seq[String]): Int = {
val it = (x, y, paramTypes).zipped.toIterator
val it = x.lazyZip(y).lazyZip(paramTypes).iterator
while(it.hasNext) {
val (x, y, (asLong, asDouble)) = it.next()
if(x != null || y != null) {
Expand All @@ -237,7 +237,7 @@ object RunResult extends Logging {
val diff = Ordering.Long.compare(x.toLong, y.toLong)
if(diff != 0) return diff
} else if(asDouble) {
val diff = Ordering.Double.compare(x.toDouble, y.toDouble)
val diff = Ordering.Double.TotalOrdering.compare(x.toDouble, y.toDouble)
if(diff != 0) return diff
} else {
val diff = Ordering.String.compare(x, y)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TableFormatter(val go: GlobalOptions) {
import TableFormatter._
import go.format._

protected[this] def formatLine(line: IndexedSeq[Any], formats: IndexedSeq[Format]): IndexedSeq[Cell] = (line, formats).zipped.map { (v, c) =>
protected[this] def formatLine(line: IndexedSeq[Any], formats: IndexedSeq[Format]): IndexedSeq[Cell] = line.lazyZip(formats).map { (v, c) =>
def fmtSimple(v: Any): String = v match {
case null => ""
case Some(v) => fmtSimple(v)
Expand Down Expand Up @@ -83,7 +83,7 @@ class TableFormatter(val go: GlobalOptions) {
}
}
}
widths
widths.toIndexedSeq
}

private def formatSeparator(widths: IndexedSeq[Int], lIdx: Int, cIdx: Int, rIdx: Int): String = {
Expand Down

0 comments on commit e4e44e6

Please sign in to comment.