Configuration.prepareDatabase requires a Sendable closure

This commit is contained in:
Gwendal Roué committed 2023-11-05 15:13:18 +01:00
1 parent 904f53749e
commit cc26fb91aa
1 file changed
+2 -2
+2 -2
View File
@@ -186,7 +186,7 @@ public struct Configuration {
// MARK: - Managing SQLite Connections
private var setups: [(Database) throws -> Void] = []
private var setups: [@Sendable (Database) throws -> Void] = []
/// Defines a function to run whenever an SQLite connection is opened.
///
@@ -223,7 +223,7 @@ public struct Configuration {
///
/// On newly created databases files, ``DatabasePool`` activates the WAL
/// mode after the preparation functions have run.
public mutating func prepareDatabase(_ setup: @escaping (Database) throws -> Void) {
public mutating func prepareDatabase(_ setup: @escaping @Sendable (Database) throws -> Void) {
setups.append(setup)
}