@@ -99,13 +99,13 @@ package struct CandidateBatch: Sendable {
9999 /// Don't add a method that returns a candidate, the candidates have unsafe pointers back into the batch, and
100100 /// must not outlive it.
101101 @inline ( __always)
102- func enumerate( body: ( Candidate ) throws -> ( ) ) rethrows {
102+ func enumerate( body: ( Candidate ) throws -> Void ) rethrows {
103103 for idx in 0 ..< count {
104104 try body ( candidate ( at: idx) )
105105 }
106106 }
107107
108- func enumerate( _ range: Range < Int > , body: ( Int , Candidate ) throws -> ( ) ) rethrows {
108+ func enumerate( _ range: Range < Int > , body: ( Int , Candidate ) throws -> Void ) rethrows {
109109 precondition ( range. lowerBound >= 0 )
110110 precondition ( range. upperBound <= count)
111111 for idx in range {
@@ -224,15 +224,15 @@ package struct CandidateBatch: Sendable {
224224 append ( contentsOf: candidates, contentType: contentType)
225225 }
226226
227- package func enumerate( body: ( Candidate ) throws -> ( ) ) rethrows {
227+ package func enumerate( body: ( Candidate ) throws -> Void ) rethrows {
228228 try readonlyStorage. enumerate ( body: body)
229229 }
230230
231- package func enumerate( body: ( Int , Candidate ) throws -> ( ) ) rethrows {
231+ package func enumerate( body: ( Int , Candidate ) throws -> Void ) rethrows {
232232 try readonlyStorage. enumerate ( 0 ..< count, body: body)
233233 }
234234
235- internal func enumerate( _ range: Range < Int > , body: ( Int , Candidate ) throws -> ( ) ) rethrows {
235+ internal func enumerate( _ range: Range < Int > , body: ( Int , Candidate ) throws -> Void ) rethrows {
236236 try readonlyStorage. enumerate ( range, body: body)
237237 }
238238
@@ -283,7 +283,7 @@ package struct CandidateBatch: Sendable {
283283 count > 0
284284 }
285285
286- private mutating func mutate( body: ( inout UnsafeStorage ) -> ( ) ) {
286+ private mutating func mutate( body: ( inout UnsafeStorage ) -> Void ) {
287287 if !isKnownUniquelyReferenced( & __storageBox_useAccessor) {
288288 __storageBox_useAccessor = __storageBox_useAccessor. copy ( )
289289 }
@@ -524,7 +524,7 @@ package struct Candidate {
524524// Creates a buffer of `capacity` elements of type `T?`, each initially set to nil.
525525///
526526/// After running `initialize`, returns all elements that were set to non-`nil` values.
527- private func compactScratchArea< T> ( capacity: Int , initialize: ( UnsafeMutablePointer < T ? > ) -> ( ) ) -> [ T ] {
527+ private func compactScratchArea< T> ( capacity: Int , initialize: ( UnsafeMutablePointer < T ? > ) -> Void ) -> [ T ] {
528528 let scratchArea = UnsafeMutablePointer< T?> . allocate( capacity: capacity)
529529 scratchArea. initialize ( repeating: nil , count: capacity)
530530 defer {
0 commit comments