Skip to content

Commit 649561e

Browse files
committed
Remove all code that soly existed to support Swift 5.8
1 parent 8f7e900 commit 649561e

File tree

5 files changed

+1
-1423
lines changed

5 files changed

+1
-1423
lines changed

Diff for: Sources/ConnectionPoolModule/ConnectionPool.swift

-14
Original file line numberDiff line numberDiff line change
@@ -571,20 +571,6 @@ extension PoolConfiguration {
571571
}
572572
}
573573

574-
#if swift(<5.9)
575-
// This should be removed once we support Swift 5.9+ only
576-
extension AsyncStream {
577-
static func makeStream(
578-
of elementType: Element.Type = Element.self,
579-
bufferingPolicy limit: Continuation.BufferingPolicy = .unbounded
580-
) -> (stream: AsyncStream<Element>, continuation: AsyncStream<Element>.Continuation) {
581-
var continuation: AsyncStream<Element>.Continuation!
582-
let stream = AsyncStream<Element>(bufferingPolicy: limit) { continuation = $0 }
583-
return (stream: stream, continuation: continuation!)
584-
}
585-
}
586-
#endif
587-
588574
@usableFromInline
589575
protocol TaskGroupProtocol {
590576
// We need to call this `addTask_` because some Swift versions define this

Diff for: Sources/PostgresNIO/New/NotificationListener.swift

-16
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,3 @@ final class NotificationListener: @unchecked Sendable {
140140
}
141141
}
142142
}
143-
144-
145-
#if compiler(<5.9)
146-
// Async stream API backfill
147-
extension AsyncThrowingStream {
148-
static func makeStream(
149-
of elementType: Element.Type = Element.self,
150-
throwing failureType: Failure.Type = Failure.self,
151-
bufferingPolicy limit: Continuation.BufferingPolicy = .unbounded
152-
) -> (stream: AsyncThrowingStream<Element, Failure>, continuation: AsyncThrowingStream<Element, Failure>.Continuation) where Failure == Error {
153-
var continuation: AsyncThrowingStream<Element, Failure>.Continuation!
154-
let stream = AsyncThrowingStream<Element, Failure>(bufferingPolicy: limit) { continuation = $0 }
155-
return (stream: stream, continuation: continuation!)
156-
}
157-
}
158-
#endif

0 commit comments

Comments
 (0)