Use consistent variable names

This commit is contained in:
Matt Zanchelli committed 2021-02-15 13:29:43 -08:00
1 parent bdf36ad23d
commit 44d359b429
1 file changed
+6 -7
+6 -7
View File
@@ -59,13 +59,12 @@ extension MutableCollection where Self: BidirectionalCollection {
@inlinable
public mutating func reverse(subrange: Range<Index>) {
if subrange.isEmpty { return }
var lo = subrange.lowerBound
var hi = subrange.upperBound
while lo < hi {
formIndex(before: &hi)
swapAt(lo, hi)
formIndex(after: &lo)
var lower = subrange.lowerBound
var upper = subrange.upperBound
while lower < upper {
formIndex(before: &upper)
swapAt(lower, upper)
formIndex(after: &lower)
}
}
}