Skip to content

Commit 9af4a76

Browse files
committed
Use tuple comparison
1 parent 8500d0c commit 9af4a76

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

stdlib/public/Synchronization/Atomics/WordPair.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,11 @@ extension WordPair: Hashable {
187187
extension WordPair: Comparable {
188188
// Note: This function can have a lower availability than the conformance
189189
// itself because it's always emit into client.
190-
@available(SwiftStdlib 6.0, *)
190+
@available(SwiftStdlib 6.2, *)
191191
@_alwaysEmitIntoClient
192192
@_transparent
193193
public static func <(lhs: WordPair, rhs: WordPair) -> Bool {
194-
if lhs.first != rhs.first {
195-
return lhs.first < rhs.first
196-
} else {
197-
return lhs.second < rhs.second
198-
}
194+
(lhs.first, lhs.second) < (rhs.first, rhs.second)
199195
}
200196
}
201197

0 commit comments

Comments
 (0)