Skip to content

Commit c0c7046

Browse files
committed
Remove unnecessary condition in IndexSetBoundaryIterator
1 parent 32a0224 commit c0c7046

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/SDK/Foundation/IndexSet.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,8 @@ private struct IndexSetBoundaryIterator : IteratorProtocol {
820820
// 1 has the next element, or they are the same.
821821
result = nextIn1
822822
if i1UsedLower { i1Range = i1.next() }
823-
// We need to iterate both the value from is1 and is2 in the == case, but only if they are both lower bounds or both upper bounds
824-
if i1UsedLower == i2UsedLower && result == nextIn2 {
823+
// We need to iterate both the value from is1 and is2 in the == case.
824+
if result == nextIn2 {
825825
if i2UsedLower { i2Range = i2.next() }
826826
i2UsedLower = !i2UsedLower
827827
}

0 commit comments

Comments
 (0)