File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -427,18 +427,18 @@ object IArray:
427
427
/** Build an array from the iterable collection.
428
428
*
429
429
* {{{
430
- * scala> val a = Array .from(Seq(1, 5))
431
- * val a: Array [Int] = Array (1, 5)
430
+ * scala> val a = IArray .from(Seq(1, 5))
431
+ * val a: IArray [Int] = IArray (1, 5)
432
432
*
433
- * scala> val b = Array .from(Range(1, 5))
434
- * val b: Array [Int] = Array (1, 2, 3, 4)
433
+ * scala> val b = IArray .from(Range(1, 5))
434
+ * val b: IArray [Int] = IArray (1, 2, 3, 4)
435
435
* }}}
436
436
*
437
437
* @param it the iterable collection
438
438
* @return an array consisting of elements of the iterable collection
439
439
*/
440
- def from [A : ClassTag ](it : IterableOnce [A ]): Array [A ] =
441
- Array .from(it)
440
+ def from [A : ClassTag ](it : IterableOnce [A ]): IArray [A ] =
441
+ unsafeFromArray( Array .from(it) )
442
442
443
443
def newBuilder [T ](using t : ClassTag [T ]): Builder [T , IArray [T ]] =
444
444
ArrayBuilder .make[T ].mapResult(IArray .unsafeFromArray)
You can’t perform that action at this time.
0 commit comments