File tree 1 file changed +3
-3
lines changed
scala2-library-cc/src/scala/collection
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import scala.annotation.tailrec
17
17
import scala .annotation .unchecked .uncheckedVariance
18
18
import scala .runtime .Statics
19
19
import language .experimental .captureChecking
20
-
20
+ import caps . unsafe . unsafeAssumePure
21
21
22
22
/** Iterators are data structures that allow to iterate over a sequence
23
23
* of elements. They have a `hasNext` method for checking
@@ -1008,7 +1008,7 @@ object Iterator extends IterableFactory[Iterator] {
1008
1008
def newBuilder [A ]: Builder [A , Iterator [A ]] =
1009
1009
new ImmutableBuilder [A , Iterator [A ]](empty[A ]) {
1010
1010
override def addOne (elem : A ): this .type = { elems = elems ++ single(elem); this }
1011
- }.asInstanceOf // !!! CC unsafe op
1011
+ }.unsafeAssumePure
1012
1012
1013
1013
/** Creates iterator that produces the results of some element computation a number of times.
1014
1014
*
@@ -1160,7 +1160,7 @@ object Iterator extends IterableFactory[Iterator] {
1160
1160
@ tailrec def merge (): Unit =
1161
1161
if (current.isInstanceOf [ConcatIterator [_]]) {
1162
1162
val c : ConcatIterator [A ] = current.asInstanceOf
1163
- current = c.current.asInstanceOf // !!! CC unsafe op
1163
+ current = c.current.unsafeAssumePure // !!! CC unsafe op
1164
1164
currentHasNextChecked = c.currentHasNextChecked
1165
1165
if (c.tail != null ) {
1166
1166
if (last == null ) last = c.last
You can’t perform that action at this time.
0 commit comments