@@ -631,41 +631,8 @@ public struct URL : ReferenceConvertible, Equatable {
631
631
public init ( fileURLWithFileSystemRepresentation path: UnsafePointer < Int8 > , isDirectory: Bool , relativeTo baseURL: __shared URL? ) {
632
632
_url = URL . _converted ( from: NSURL ( fileURLWithFileSystemRepresentation: path, isDirectory: isDirectory, relativeTo: baseURL) )
633
633
}
634
-
635
- public var hashValue : Int { // FIXME(hashValue): This should be removed once URL implements Hashable.
636
- return _url. hash
637
- }
638
634
639
- @_alwaysEmitIntoClient // Introduced in 5.1
640
635
public func hash( into hasher: inout Hasher ) {
641
- // We expect this function to eventually satisfy the corresponding
642
- // requirement when URL starts conforming to Hashable. However, in the
643
- // meantime, it is useful to provide it so that user code can simply
644
- // declare the conformance if desired, without implementing anything.
645
- //
646
- // We want this definition to be available to all clients, even those
647
- // that get deployed with the 5.0 Foundation overlay where URL did not
648
- // provide this method. The `@_alwaysEmitIntoClient` attribute above
649
- // forces this function to get compiled into any user code that uses it.
650
- if #available( macOS 9999 , iOS 9999 , tvOS 9999 , watchOS 9999 , * ) {
651
- // When we're on recent enough ABI, we forward the call to the
652
- // resilient implementation provided below. The availability check
653
- // above guarantees that the entry point will exist in the library
654
- // we link with.
655
- _hash ( into: & hasher)
656
- } else {
657
- // This is the hash encoding that gets used with the 5.0 ABI. It has
658
- // to match the version of == implemented by 5.0, so it shouldn't
659
- // ever be changed.
660
- hasher. combine ( _bridgeToObjectiveC ( ) )
661
- }
662
- }
663
-
664
- @usableFromInline
665
- @available ( macOS 9999 , iOS 9999 , tvOS 9999 , watchOS 9999 , * )
666
- internal func _hash( into hasher: inout Hasher ) {
667
- // This code is beyond a resilience boundary. It has to be kept in
668
- // sync with the definition of == implemented below.
669
636
hasher. combine ( _url)
670
637
}
671
638
0 commit comments