Skip to content

Commit 76d56b9

Browse files
committed
[Foundation] URLRequest: Modernize hashing
1 parent 4999448 commit 76d56b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Darwin/Foundation-swiftoverlay/URLRequest.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ public struct URLRequest : ReferenceConvertible, Equatable, Hashable {
229229
}
230230
}
231231

232-
public var hashValue: Int {
233-
return _handle.map { $0.hashValue }
232+
public func hash(into hasher: inout Hasher) {
233+
hasher.combine(_handle._uncopiedReference())
234234
}
235-
235+
236236
public static func ==(lhs: URLRequest, rhs: URLRequest) -> Bool {
237237
return lhs._handle._uncopiedReference().isEqual(rhs._handle._uncopiedReference())
238238
}

0 commit comments

Comments
 (0)