Skip to content

Commit 44d359b

Browse files
committed
Use consistent variable names
1 parent bdf36ad commit 44d359b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Sources/Algorithms/Rotate.swift

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,12 @@ extension MutableCollection where Self: BidirectionalCollection {
5959
@inlinable
6060
public mutating func reverse(subrange: Range<Index>) {
6161
if subrange.isEmpty { return }
62-
var lo = subrange.lowerBound
63-
var hi = subrange.upperBound
64-
65-
while lo < hi {
66-
formIndex(before: &hi)
67-
swapAt(lo, hi)
68-
formIndex(after: &lo)
62+
var lower = subrange.lowerBound
63+
var upper = subrange.upperBound
64+
while lower < upper {
65+
formIndex(before: &upper)
66+
swapAt(lower, upper)
67+
formIndex(after: &lower)
6968
}
7069
}
7170
}

0 commit comments

Comments
 (0)