Skip to content

Commit 316ff9f

Browse files
authored
Revert "Revert "[gardening][NSLocale] Move operators into types""
1 parent 01ffe57 commit 316ff9f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Foundation/NSLocale.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,14 @@ extension NSLocale {
236236
}
237237

238238

239-
public func ==(_ lhs: NSLocale.Key, _ rhs: NSLocale.Key) -> Bool {
240-
return lhs.rawValue == rhs.rawValue
241-
}
239+
extension NSLocale.Key {
240+
public static func ==(_ lhs: NSLocale.Key, _ rhs: NSLocale.Key) -> Bool {
241+
return lhs.rawValue == rhs.rawValue
242+
}
242243

243-
public func <(_ lhs: NSLocale.Key, _ rhs: NSLocale.Key) -> Bool {
244-
return lhs.rawValue < rhs.rawValue
244+
public static func <(_ lhs: NSLocale.Key, _ rhs: NSLocale.Key) -> Bool {
245+
return lhs.rawValue < rhs.rawValue
246+
}
245247
}
246248

247249

0 commit comments

Comments
 (0)