Skip to content

Commit

Permalink
Revert some unwanted changes, preparing for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Brunner committed Dec 3, 2019
1 parent 358ea0e commit 26b9899
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions bench/src/main/scala/Benchmarks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ object Bench {
val iterations = if (intArgs.length > 1) intArgs(1).toInt else 20
val forks = if (intArgs.length > 2) intArgs(2).toInt else 1


import File.{ separator => sep }

val args2 = args1.map { arg =>
Expand Down
9 changes: 3 additions & 6 deletions library/src/scala/runtime/DynamicTuple.scala
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,9 @@ object DynamicTuple {
).asInstanceOf[Zip[This, T2]]
}

def dynamicMap[This <: Tuple, F[_]](self: This, f: [t] => t => F[t]): Map[This, F] = (self: Any) match {
case self: Unit => ().asInstanceOf[Map[This, F]]
case _ =>
Tuple.fromArray(self.asInstanceOf[Product].productIterator.map(f(_)).toArray) // TODO use toIArray of Object to avoid double/triple array copy
.asInstanceOf[Map[This, F]]
}
def dynamicMap[This <: Tuple, F[_]](self: This, f: [t] => t => F[t]): Map[This, F] =
Tuple.fromArray(self.asInstanceOf[Product].productIterator.map(f(_)).toArray) // TODO use toIArray of Object to avoid double/triple array copy
.asInstanceOf[Map[This, F]]

def consIterator(head: Any, tail: Tuple): Iterator[Any] =
Iterator.single(head) ++ tail.asInstanceOf[Product].productIterator
Expand Down

0 comments on commit 26b9899

Please sign in to comment.