File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
scala2-library-cc/src/scala/collection Expand file tree Collapse file tree 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
1717import scala .annotation .unchecked .uncheckedVariance
1818import scala .runtime .Statics
1919import language .experimental .captureChecking
20-
20+ import caps . unsafe . unsafeAssumePure
2121
2222/** Iterators are data structures that allow to iterate over a sequence
2323 * of elements. They have a `hasNext` method for checking
@@ -1008,7 +1008,7 @@ object Iterator extends IterableFactory[Iterator] {
10081008 def newBuilder [A ]: Builder [A , Iterator [A ]] =
10091009 new ImmutableBuilder [A , Iterator [A ]](empty[A ]) {
10101010 override def addOne (elem : A ): this .type = { elems = elems ++ single(elem); this }
1011- }.asInstanceOf // !!! CC unsafe op
1011+ }.unsafeAssumePure
10121012
10131013 /** Creates iterator that produces the results of some element computation a number of times.
10141014 *
@@ -1160,7 +1160,7 @@ object Iterator extends IterableFactory[Iterator] {
11601160 @ tailrec def merge (): Unit =
11611161 if (current.isInstanceOf [ConcatIterator [_]]) {
11621162 val c : ConcatIterator [A ] = current.asInstanceOf
1163- current = c.current.asInstanceOf // !!! CC unsafe op
1163+ current = c.current.unsafeAssumePure // !!! CC unsafe op
11641164 currentHasNextChecked = c.currentHasNextChecked
11651165 if (c.tail != null ) {
11661166 if (last == null ) last = c.last
You can’t perform that action at this time.
0 commit comments