Skip to content

Commit

Permalink
Add missing Sendable annotations (#260)
Browse files Browse the repository at this point in the history
Add missing Sendable annotations.
  • Loading branch information
gwynne authored Apr 2, 2024
1 parent f6c1bff commit e26763a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/PostgresKit/Deprecations/PostgresColumnType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public struct PostgresColumnType: SQLExpression, Hashable {
private let primitive: Primitive
private init(_ primitive: Primitive) { self.primitive = primitive }

enum Primitive: CustomStringConvertible, Hashable {
enum Primitive: CustomStringConvertible, Hashable, Sendable {
case bigint /// signed eight-byte integer
case bigserial /// autoincrementing eight-byte integer
case bit(Int?) /// fixed-length bit string
Expand Down
2 changes: 1 addition & 1 deletion Sources/PostgresKit/PostgresDatabase+SQL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ extension _PostgresSQLDatabase: SQLDatabase, PostgresDatabase {
self.database.withConnection(closure)
}

func withSession<R>(_ closure: @escaping (any SQLDatabase) async throws -> R) async throws -> R {
func withSession<R>(_ closure: @escaping @Sendable (any SQLDatabase) async throws -> R) async throws -> R {
try await self.withConnection { c in
c.eventLoop.makeFutureWithTask {
try await closure(c.sql(
Expand Down

0 comments on commit e26763a

Please sign in to comment.