Skip to content

Commit 5bb7baa

Browse files
author
Nicholas Maccharoli
committed
[stdlib] simplify loop logic
1 parent e5a6b22 commit 5bb7baa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

stdlib/public/core/Join.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public struct JoinedIterator<Base : IteratorProtocol> : IteratorProtocol
3737
///
3838
/// Once `nil` has been returned, all subsequent calls return `nil`.
3939
public mutating func next() -> Base.Element.Iterator.Element? {
40-
repeat {
40+
while true {
4141
switch _state {
4242
case .start:
4343
if let nextSubSequence = _base.next() {
@@ -75,7 +75,6 @@ public struct JoinedIterator<Base : IteratorProtocol> : IteratorProtocol
7575

7676
}
7777
}
78-
while true
7978
}
8079

8180
internal var _base: Base

0 commit comments

Comments
 (0)