mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
LF: Drop wrong toArraySeq method from ImmArray. (#12163)
The method is not correctly implement, as it should slice the underlying array before returning it. Since it is not possible to implement it in constant time, we simply drop it, in favor in other conversion. CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
101356ba36
commit
39ee326a51
@ -12,8 +12,7 @@ import scalaz.{Applicative, Equal, Foldable, Order, Traverse}
|
||||
|
||||
import scala.annotation.tailrec
|
||||
import scala.collection.StrictOptimizedSeqFactory
|
||||
import scala.collection.immutable.ArraySeq
|
||||
import scala.collection.immutable.{AbstractSeq, IndexedSeqOps, StrictOptimizedSeqOps}
|
||||
import scala.collection.immutable.{AbstractSeq, ArraySeq, IndexedSeqOps, StrictOptimizedSeqOps}
|
||||
import scala.collection.mutable.Builder
|
||||
import scala.reflect.ClassTag
|
||||
|
||||
@ -261,9 +260,7 @@ final class ImmArray[+A] private (
|
||||
* return the `array` as is and people would be able to break the original
|
||||
* `ImmArray`.
|
||||
*/
|
||||
def toSeq: ImmArray.ImmArraySeq[A] = new ImmArray.ImmArraySeq(this)
|
||||
|
||||
def toArraySeq: ArraySeq[A] = array
|
||||
def toSeq: ImmArray.ImmArraySeq[A] = toIndexedSeq
|
||||
|
||||
/** O(n) */
|
||||
def collect[B](f: PartialFunction[A, B]): ImmArray[B] = {
|
||||
|
Loading…
Reference in New Issue
Block a user