Skip to content

Commit 6bd2b0b

Browse files
committed
Merge pull request #547 from nielsandriesse/patch-13
Update CollectionType.split(_:_:_:) for removal of ++ operator
2 parents 5227984 + 380c4e5 commit 6bd2b0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/core/Collection.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,14 +451,14 @@ extension CollectionType {
451451
while subSequenceEnd != cachedEndIndex {
452452
if try isSeparator(self[subSequenceEnd]) {
453453
let didAppend = appendSubsequence(end: subSequenceEnd)
454-
++subSequenceEnd
454+
subSequenceEnd._successorInPlace()
455455
subSequenceStart = subSequenceEnd
456456
if didAppend && result.count == maxSplit {
457457
break
458458
}
459459
continue
460460
}
461-
++subSequenceEnd
461+
subSequenceEnd._successorInPlace()
462462
}
463463

464464
if subSequenceStart != cachedEndIndex || allowEmptySlices {

0 commit comments

Comments
 (0)