@@ -82,9 +82,7 @@ extension DatabaseConfigurationFactory {
82
82
decodingContext: PostgresDecodingContext < some PostgresJSONDecoder > ,
83
83
sqlLogLevel: Logger . Level = . debug
84
84
) -> DatabaseConfigurationFactory {
85
- let configuration = FakeSendable ( wrappedValue: configuration)
86
-
87
- return . init {
85
+ . init {
88
86
FluentPostgresConfiguration (
89
87
configuration: configuration,
90
88
maxConnectionsPerEventLoop: maxConnectionsPerEventLoop,
@@ -97,8 +95,6 @@ extension DatabaseConfigurationFactory {
97
95
}
98
96
}
99
97
100
- private struct FakeSendable < T> : @unchecked Sendable { let wrappedValue : T }
101
-
102
98
/// We'd like to just default the context parameters of the "actual" method. Unfortunately, there are a few
103
99
/// cases involving the UNIX domain socket initalizer where usage can resolve to either the new
104
100
/// `SQLPostgresConfiguration`-based method or the deprecated `PostgresConfiguration`-based method, with no
@@ -172,15 +168,15 @@ extension DatabaseConfigurationFactory {
172
168
/// The actual concrete configuration type produced by a configuration factory.
173
169
struct FluentPostgresConfiguration < E: PostgresJSONEncoder , D: PostgresJSONDecoder > : DatabaseConfiguration {
174
170
var middleware : [ any AnyModelMiddleware ] = [ ]
175
- fileprivate let configuration : FakeSendable < SQLPostgresConfiguration >
171
+ fileprivate let configuration : SQLPostgresConfiguration
176
172
let maxConnectionsPerEventLoop : Int
177
173
let connectionPoolTimeout : TimeAmount
178
174
let encodingContext : PostgresEncodingContext < E >
179
175
let decodingContext : PostgresDecodingContext < D >
180
176
let sqlLogLevel : Logger . Level
181
177
182
178
func makeDriver( for databases: Databases ) -> any DatabaseDriver {
183
- let connectionSource = PostgresConnectionSource ( sqlConfiguration: self . configuration. wrappedValue )
179
+ let connectionSource = PostgresConnectionSource ( sqlConfiguration: self . configuration)
184
180
let elgPool = EventLoopGroupConnectionPool (
185
181
source: connectionSource,
186
182
maxConnectionsPerEventLoop: self . maxConnectionsPerEventLoop,
0 commit comments