Skip to content

Commit 3da4d93

Browse files
Updated UUID's Comparable conformance to be disfavored over Foundation's
1 parent ef63efb commit 3da4d93

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/CodableDatastore/Indexes/UUID+Comparable.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@
88

99
import Foundation
1010

11+
/// Make UUIDs comparable on platforms that shipped without it, so that they can be used transparently as an index.
1112
#if swift(<5.9) || os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Windows)
12-
/// Make UUIDs comparable, so that they can be used transparently as an index.
1313
#if compiler(>=6)
1414
extension UUID: @retroactive Comparable {
1515
@inlinable
16+
@_disfavoredOverload
1617
public static func < (lhs: UUID, rhs: UUID) -> Bool {
1718
lhs.isLessThan(rhs: rhs)
1819
}
1920
}
2021
#else
2122
extension UUID: Comparable {
2223
@inlinable
24+
@_disfavoredOverload
2325
public static func < (lhs: UUID, rhs: UUID) -> Bool {
2426
lhs.isLessThan(rhs: rhs)
2527
}

0 commit comments

Comments
 (0)