From e26763a6cb8d852f7ce01b1cd5925b3d8d084801 Mon Sep 17 00:00:00 2001 From: Gwynne Raskind Date: Tue, 2 Apr 2024 10:51:34 -0500 Subject: [PATCH] Add missing Sendable annotations (#260) Add missing Sendable annotations. --- Sources/PostgresKit/Deprecations/PostgresColumnType.swift | 2 +- Sources/PostgresKit/PostgresDatabase+SQL.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/PostgresKit/Deprecations/PostgresColumnType.swift b/Sources/PostgresKit/Deprecations/PostgresColumnType.swift index 88b352f..19f6f67 100644 --- a/Sources/PostgresKit/Deprecations/PostgresColumnType.swift +++ b/Sources/PostgresKit/Deprecations/PostgresColumnType.swift @@ -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 diff --git a/Sources/PostgresKit/PostgresDatabase+SQL.swift b/Sources/PostgresKit/PostgresDatabase+SQL.swift index 0d2c070..dac3c40 100644 --- a/Sources/PostgresKit/PostgresDatabase+SQL.swift +++ b/Sources/PostgresKit/PostgresDatabase+SQL.swift @@ -109,7 +109,7 @@ extension _PostgresSQLDatabase: SQLDatabase, PostgresDatabase { self.database.withConnection(closure) } - func withSession(_ closure: @escaping (any SQLDatabase) async throws -> R) async throws -> R { + func withSession(_ 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(