Skip to content

Commit

Permalink
Drop support for Swift < 5.9 (#39)
Browse files Browse the repository at this point in the history
Motivation:

Consistent support model with other libraries.

Modifications:

Drop old Package.swifts and set tools version.
Remove unnecessary compiler guards

Result:

Swift < 5.9 not supported any more
  • Loading branch information
PeterAdams-A authored Nov 1, 2024
1 parent d93f78c commit fae0977
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 373 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.6
// swift-tools-version:5.9

import PackageDescription

Expand Down
168 changes: 0 additions & 168 deletions [email protected]

This file was deleted.

168 changes: 0 additions & 168 deletions [email protected]

This file was deleted.

2 changes: 0 additions & 2 deletions Sources/CassandraClient/CassandraClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ public class CassandraClient: CassandraSession {
}
}

#if compiler(>=5.5) && canImport(_Concurrency)
extension CassandraClient {
/// Execute a ``Statement`` using the default ``CassandraSession``.
///
Expand Down Expand Up @@ -306,6 +305,5 @@ extension CassandraClient {
return try await handler(session)
}
}
#endif

internal typealias EventLoopGroupConainer = (value: EventLoopGroup, managed: Bool)
2 changes: 0 additions & 2 deletions Sources/CassandraClient/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ extension CassandraClient {
return clusterPromise.futureResult
}

#if compiler(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
internal func makeCluster() async throws -> Cluster {
try await withCheckedThrowingContinuation { continuation in
Expand All @@ -117,7 +116,6 @@ extension CassandraClient {
}
}
}
#endif

private func makeCluster(contactPoints: ContactPoints) throws -> Cluster {
let cluster = Cluster()
Expand Down
4 changes: 0 additions & 4 deletions Sources/CassandraClient/Data+PaginatedRows.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ extension CassandraClient {
return _map([])
}

#if compiler(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
internal init(session: Session, statement: Statement, logger: Logger?) {
self.session = session
Expand Down Expand Up @@ -192,11 +191,9 @@ extension CassandraClient {
}
return try await _map([])
}
#endif
}
}

#if compiler(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
extension CassandraClient.PaginatedRows: AsyncSequence {
public typealias Element = CassandraClient.Row
Expand Down Expand Up @@ -258,4 +255,3 @@ extension CassandraClient.PaginatedRows: AsyncSequence {
}
}
}
#endif
Loading

0 comments on commit fae0977

Please sign in to comment.