Skip to content

Commit a476f69

Browse files
authored
Add missing availibility flags (#99)
1 parent 5a81dd7 commit a476f69

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Sources/RediStack/Cluster/RedisClusterShardDescriptionProtocol.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
/// A description of a single shard that is part of a redis cluster
16+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
1617
public protocol RedisClusterShardDescriptionProtocol: Identifiable, Sendable {
1718
associatedtype NodeDescription: RedisClusterNodeDescriptionProtocol
1819

Sources/RediStack/Cluster/SwiftPolyfill.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,19 @@
1414

1515
/// We use this protocol internally to abstract over TaskGroups. On Linux we can always use a `DiscardingTaskGroup`,
1616
/// but to support Swift 5.8 on macOS we need to fallback to the original TaskGroup.
17+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
1718
protocol DiscardingTaskGroupProtocol {
1819
mutating func addTask(priority: TaskPriority?, operation: @escaping @Sendable () async -> Void)
1920
}
2021

22+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
2123
extension DiscardingTaskGroupProtocol {
2224
mutating func addTask(_ operation: @escaping @Sendable () async -> Void) {
2325
self.addTask(priority: nil, operation: operation)
2426
}
2527
}
2628

29+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
2730
extension TaskGroup: DiscardingTaskGroupProtocol where ChildTaskResult == Void {}
2831

2932
#if swift(>=5.9) || (swift(>=5.8) && os(Linux))

0 commit comments

Comments
 (0)