Skip to content

Commit 5442de0

Browse files
committed
[Concurrency] Hashable funcs should be inlinable for AsyncStream
1 parent 36ed9e1 commit 5442de0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

stdlib/public/Concurrency/AsyncStream.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,13 +478,16 @@ extension AsyncStream.Continuation.YieldResult: Sendable where Element: Sendable
478478
@available(SwiftStdlib 6.2, *)
479479
extension AsyncStream.Continuation: Hashable {
480480
@available(SwiftStdlib 6.2, *)
481+
@inlinable
481482
public func hash(into hasher: inout Hasher) {
482483
return hasher.combine(ObjectIdentifier(storage))
483484
}
484485
@available(SwiftStdlib 6.2, *)
486+
@inlinable
485487
public var hashValue: Int {
486488
return _hashValue(for: self)
487489
}
490+
@inlinable
488491
@available(SwiftStdlib 6.2, *)
489492
public static func == (lhs: Self, rhs: Self) -> Bool {
490493
return lhs.storage === rhs.storage

stdlib/public/Concurrency/AsyncThrowingStream.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,14 +524,17 @@ extension AsyncThrowingStream.Continuation.YieldResult: Sendable where Element:
524524
@available(SwiftStdlib 6.2, *)
525525
extension AsyncThrowingStream.Continuation: Hashable {
526526
@available(SwiftStdlib 6.2, *)
527+
@inlinable
527528
public func hash(into hasher: inout Hasher) {
528529
return hasher.combine(ObjectIdentifier(storage))
529530
}
530531
@available(SwiftStdlib 6.2, *)
532+
@inlinable
531533
public var hashValue: Int {
532534
return _hashValue(for: self)
533535
}
534536
@available(SwiftStdlib 6.2, *)
537+
@inlinable
535538
public static func == (lhs: Self, rhs: Self) -> Bool {
536539
return lhs.storage === rhs.storage
537540
}

0 commit comments

Comments
 (0)