Skip to content

Commit 2c20730

Browse files
committed
stdlib: use more idiomatic closure syntax
1 parent 8e9556e commit 2c20730

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stdlib/private/StdlibUnittest/RaceTest.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,17 +501,17 @@ public func runRaceTest<RT : RaceTestWithPerTrialDataType>(
501501
let racingThreadCount = threads ?? max(2, _stdlib_getHardwareConcurrency())
502502
let sharedState = _RaceTestSharedState<RT>(racingThreadCount: racingThreadCount)
503503

504-
let masterThreadBody: (_: ()) -> () = {
505-
(_: ()) -> () in
504+
let masterThreadBody: () -> Void = {
505+
() -> Void in
506506
for _ in 0..<trials {
507507
autoreleasepool {
508508
_masterThreadOneTrial(sharedState)
509509
}
510510
}
511511
}
512512

513-
let racingThreadBody: (Int) -> () = {
514-
(tid: Int) -> () in
513+
let racingThreadBody: (Int) -> Void = {
514+
(tid: Int) -> Void in
515515
for _ in 0..<trials {
516516
_workerThreadOneTrial(tid, sharedState)
517517
}

0 commit comments

Comments
 (0)