Skip to content

Commit 9abed8c

Browse files
committed
FlattenSequence/distance(from:to:) enhancements v3.
A half-open range is a better expression of intent.
1 parent e7b9fbb commit 9abed8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/Flatten.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ extension FlattenCollection: Collection {
303303
}
304304

305305
// The following combines the distance of three sections.
306-
let range = start <= end ? start ... end : end ... start
306+
let range = start <= end ? start ..< end : end ..< start
307307
var outer = range.lowerBound._outer
308308
var count = 0 as Int // 0...Int.max
309309

0 commit comments

Comments
 (0)