summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/mutable/GenericArray.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-09-23 20:18:52 +0000
committerPaul Phillips <paulp@improving.org>2009-09-23 20:18:52 +0000
commitc2d33c65850de429a701a6009fe88e67eebc0fb1 (patch)
tree1df3b5e5733e73ae2e0909aaf92398dda3cd7049 /src/library/scala/collection/mutable/GenericArray.scala
parent2c5bd20a7e5c912f62d88f1ba4ff288f19049be3 (diff)
downloadscala-c2d33c65850de429a701a6009fe88e67eebc0fb1.tar.gz
scala-c2d33c65850de429a701a6009fe88e67eebc0fb1.tar.bz2
scala-c2d33c65850de429a701a6009fe88e67eebc0fb1.zip
The results of examining many instances of !!! ...
The results of examining many instances of !!! and seeing what I can do about rendering them less exclamatory. It is not completely out of the realm of possibility that I have calmed down something which would best have remained excited, but I am endeavoring to be more "daring" (in the words of the BAFL.)
Diffstat (limited to 'src/library/scala/collection/mutable/GenericArray.scala')
-rw-r--r--src/library/scala/collection/mutable/GenericArray.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/library/scala/collection/mutable/GenericArray.scala b/src/library/scala/collection/mutable/GenericArray.scala
index a1a86b2491..43cc03f07a 100644
--- a/src/library/scala/collection/mutable/GenericArray.scala
+++ b/src/library/scala/collection/mutable/GenericArray.scala
@@ -70,8 +70,7 @@ object GenericArray extends SequenceFactory[GenericArray] {
def newBuilder[A]: Builder[A, GenericArray[A]] =
new ArrayBuffer[A] mapResult { buf =>
val result = new GenericArray[A](buf.length)
- for (i <- 0 until buf.length) result.array(i) = buf(i).asInstanceOf[AnyRef]
- // !!! todo: replace with buf.copyToArray(result.array, 0)
+ buf.copyToArray(result.array.asInstanceOf[Array[Any]], 0)
result
}
}