Skip to content

Commit 0484d39

Browse files
committed
@sendable annotations on withApp
1 parent 68e9242 commit 0484d39

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Tests/AppTests/AnalyzeErrorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ extension AllTests.AnalyzeErrorTests {
192192
#warning("Move this into a trait on @Test")
193193
// See https://forums.swift.org/t/converting-xctest-invoketest-to-swift-testing/77692/4 for details
194194
#endif
195-
var defaultDependencies: (inout DependencyValues) async throws -> Void {
195+
var defaultDependencies: @Sendable (inout DependencyValues) async throws -> Void {
196196
{
197197
$0.date.now = .t0
198198
$0.environment.allowSocialPosts = { true }

Tests/AppTests/Helpers/TestSupport.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ import Vapor
1919
import PostgresNIO
2020

2121

22-
func withApp(_ setup: (Application) async throws -> Void = { _ in },
23-
_ updateValuesForOperation: (inout DependencyValues) async throws -> Void = { _ in },
24-
environment: Environment = .testing,
25-
_ test: (Application) async throws -> Void) async throws {
22+
func withApp(
23+
_ setup: @Sendable (Application) async throws -> Void = { _ in },
24+
_ updateValuesForOperation: @Sendable (inout DependencyValues) async throws -> Void = { _ in },
25+
environment: Environment = .testing,
26+
_ test: @Sendable (Application) async throws -> Void
27+
) async throws {
2628
prepareDependencies {
2729
$0.logger = .noop
2830
}

0 commit comments

Comments
 (0)