Skip to content

Commit dc60965

Browse files
authored
Merge pull request scala/scala#6922 from julienrf/undeprecate-tobuffer
Undeprecate IterableOnceOps#toBuffer
2 parents b12fbcc + e413c47 commit dc60965

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

library/src/scala/collection/IterableOnce.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,8 +1201,7 @@ trait IterableOnceOps[+A, +CC[_], +C] extends Any { this: IterableOnce[A] =>
12011201
@deprecated("Use .to(LazyList) instead of .toStream", "2.13.0")
12021202
@`inline` final def toStream: immutable.Stream[A] = to(immutable.Stream)
12031203

1204-
@deprecated("Use .to(Buffer) instead of .toBuffer", "2.13.0")
1205-
@`inline` final def toBuffer[B >: A]: mutable.Buffer[B] = to(mutable.Buffer)
1204+
@`inline` final def toBuffer[B >: A]: mutable.Buffer[B] = mutable.Buffer.from(this)
12061205

12071206
/** Convert collection to array. */
12081207
def toArray[B >: A: ClassTag]: Array[B] =

0 commit comments

Comments
 (0)