Skip to content

Commit

Permalink
Merge pull request #9497 from SethTisue/revert-pr-9466
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue committed Feb 12, 2021
2 parents 7e9dd07 + b53009b commit 5f0f964
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/library/scala/collection/Iterator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -991,8 +991,7 @@ object Iterator extends IterableFactory[Iterator] {
*/
def newBuilder[A]: Builder[A, Iterator[A]] =
new ImmutableBuilder[A, Iterator[A]](empty[A]) {
override def addOne(elem: A): this.type = { elems ++= single(elem); this }
override def addAll(xs: IterableOnce[A]): this.type = { elems ++= xs.iterator; this }
override def addOne(elem: A): this.type = { elems = elems ++ single(elem); this }
}

/** Creates iterator that produces the results of some element computation a number of times.
Expand Down

0 comments on commit 5f0f964

Please sign in to comment.