Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Mar 17, 2023
1 parent 2baa2df commit e896bbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bench/src-jvm/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ object Main{
val before = new String(java.nio.file.Files.readAllBytes(p))
def split(s: String) = s.linesIterator.map(_.drop(2).dropRight(2).split(" *\\| *")).toList
println(
split(prettyResults).zip(split(before)).map {
case (afterLine, beforeLine) =>
split(prettyResults).zip(split(before)).zipWithIndex.map {
case ((afterLine, beforeLine), 0 | 1) => afterLine
case ((afterLine, beforeLine), _) =>
afterLine.zip(beforeLine) match {
case Array(head, tail@_*) =>
Array(head._1) ++ tail.map { case (a, b) =>
Expand Down

0 comments on commit e896bbb

Please sign in to comment.