Skip to content

Commit 3c602cd

Browse files
authored
Move Data Hashable/Equatable conformance back to struct (#1579)
1 parent 245ec37 commit 3c602cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/FoundationEssentials/Data/Data.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ internal func _withStackOrHeapBuffer(capacity: Int, _ body: (UnsafeMutableBuffer
124124
#if compiler(>=6.2)
125125
@_addressableForDependencies
126126
#endif
127-
public struct Data : RandomAccessCollection, MutableCollection, RangeReplaceableCollection, Sendable {
127+
public struct Data : RandomAccessCollection, MutableCollection, RangeReplaceableCollection, Sendable, Hashable {
128128
public typealias Index = Int
129129
public typealias Indices = Range<Int>
130130

@@ -773,7 +773,7 @@ public struct Data : RandomAccessCollection, MutableCollection, RangeReplaceable
773773
extension Data.Deallocator : Sendable {}
774774

775775
@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
776-
extension Data : Hashable {
776+
extension Data {
777777
/// The hash value for the data.
778778
@inline(never) // This is not inlinable as emission into clients could cause cross-module inconsistencies if they are not all recompiled together.
779779
public func hash(into hasher: inout Hasher) {
@@ -782,7 +782,7 @@ extension Data : Hashable {
782782
}
783783

784784
@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
785-
extension Data : Equatable {
785+
extension Data {
786786
/// Returns `true` if the two `Data` arguments are equal.
787787
@inlinable // This is @inlinable as emission into clients is safe -- the concept of equality on Data will not change.
788788
public static func ==(d1 : Data, d2 : Data) -> Bool {

0 commit comments

Comments
 (0)