Skip to content

Commit b8efc5f

Browse files
rnropinlin168
authored andcommitted
Relax AsyncSequence.collect availability check (grpc#1616)
Motivation: Tests currently fail with: > grpc-swift/Tests/GRPCTests/GRPCAsyncClientCallTests.swift:374:61: error: 'collect()' is only available in macOS 12 or newer Modifications: Relax the availability check on the `AsyncSequence` extension. It seems to arise from the constraint on `AsyncSequence.reduce(into: Result)` which only requires 10.15, not 12. Result: Tests should pass.
1 parent 120f02f commit b8efc5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/GRPCTests/AsyncAwaitSupport/AsyncSequence+Helpers.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
16+
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
1717
extension AsyncSequence {
1818
internal func collect() async throws -> [Element] {
1919
return try await self.reduce(into: []) { accumulated, next in

0 commit comments

Comments
 (0)