Skip to content

Commit 1ed93cc

Browse files
committed
use more efficient fromProductTyped
1 parent 8631782 commit 1ed93cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/Tuple.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ object Tuple {
229229
scala.runtime.Tuple.fromProduct(product)
230230

231231
def fromProductTyped[P <: Product](p: P)(using m: scala.deriving.Mirror.ProductOf[P]): m.MirroredElemTypes =
232-
Tuple.fromArray(p.productIterator.toArray).asInstanceOf[m.MirroredElemTypes] // TODO use toIArray of Object to avoid double/triple array copy
232+
scala.runtime.Tuple.fromProduct(p).asInstanceOf[m.MirroredElemTypes]
233233
}
234234

235235
/** A tuple of 0 elements */

0 commit comments

Comments
 (0)