Skip to content

Commit f48626b

Browse files
committed
Fix
1 parent b1b0288 commit f48626b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/scala/scala/collection/decorators/MutableBitSetDecorator.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@ class MutableBitSetDecorator(protected val bs: mutable.BitSet) {
5151
val newSize = significantWordCount + wordOffset
5252
require(newSize <= MaxSize)
5353
ensureCapacity(newSize)
54-
var i = newSize - 1
55-
while (i >= wordOffset) {
56-
bs.elems(i) = bs.elems(i - wordOffset)
57-
i -= 1
58-
}
54+
System.arraycopy(bs, 0, bs, wordOffset, significantWordCount)
5955
} else {
6056
val revBitOffset = WordLength - bitOffset
6157
val extraBits = bs.elems(significantWordCount - 1) >>> revBitOffset

0 commit comments

Comments
 (0)