We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd42e2a commit bb37aebCopy full SHA for bb37aeb
library/src/scala/IArray.scala
@@ -268,6 +268,9 @@ object IArray {
268
// A convenience to avoid having to cast everything by hand
269
private given [A] as Conversion[Array[A], IArray[A]] = identity[Sub[A]]
270
271
+ /** Convert an array into an immutable array without copying the original array. */
272
+ def unsafeFromArray[T](s: Array[T]): IArray[T] = s
273
+
274
/** An immutable array of length 0. */
275
def empty[T: ClassTag]: IArray[T] = new Array[T](0)
276
0 commit comments