We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
guard
if
1 parent cd306bd commit e506c13Copy full SHA for e506c13
Sources/Algorithms/Rotate.swift
@@ -58,7 +58,7 @@ extension MutableCollection where Self: BidirectionalCollection {
58
/// - Complexity: O(*n*), where *n* is the length of `subrange`.
59
@inlinable
60
public mutating func reverse(subrange: Range<Index>) {
61
- if subrange.isEmpty { return }
+ guard !subrange.isEmpty else { return }
62
var lower = subrange.lowerBound
63
var upper = subrange.upperBound
64
while lower < upper {
0 commit comments