@@ -99,13 +99,13 @@ package struct CandidateBatch: Sendable {
99
99
/// Don't add a method that returns a candidate, the candidates have unsafe pointers back into the batch, and
100
100
/// must not outlive it.
101
101
@inline ( __always)
102
- func enumerate( body: ( Candidate ) throws -> ( ) ) rethrows {
102
+ func enumerate( body: ( Candidate ) throws -> Void ) rethrows {
103
103
for idx in 0 ..< count {
104
104
try body ( candidate ( at: idx) )
105
105
}
106
106
}
107
107
108
- func enumerate( _ range: Range < Int > , body: ( Int , Candidate ) throws -> ( ) ) rethrows {
108
+ func enumerate( _ range: Range < Int > , body: ( Int , Candidate ) throws -> Void ) rethrows {
109
109
precondition ( range. lowerBound >= 0 )
110
110
precondition ( range. upperBound <= count)
111
111
for idx in range {
@@ -224,15 +224,15 @@ package struct CandidateBatch: Sendable {
224
224
append ( contentsOf: candidates, contentType: contentType)
225
225
}
226
226
227
- package func enumerate( body: ( Candidate ) throws -> ( ) ) rethrows {
227
+ package func enumerate( body: ( Candidate ) throws -> Void ) rethrows {
228
228
try readonlyStorage. enumerate ( body: body)
229
229
}
230
230
231
- package func enumerate( body: ( Int , Candidate ) throws -> ( ) ) rethrows {
231
+ package func enumerate( body: ( Int , Candidate ) throws -> Void ) rethrows {
232
232
try readonlyStorage. enumerate ( 0 ..< count, body: body)
233
233
}
234
234
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 {
236
236
try readonlyStorage. enumerate ( range, body: body)
237
237
}
238
238
@@ -283,7 +283,7 @@ package struct CandidateBatch: Sendable {
283
283
count > 0
284
284
}
285
285
286
- private mutating func mutate( body: ( inout UnsafeStorage ) -> ( ) ) {
286
+ private mutating func mutate( body: ( inout UnsafeStorage ) -> Void ) {
287
287
if !isKnownUniquelyReferenced( & __storageBox_useAccessor) {
288
288
__storageBox_useAccessor = __storageBox_useAccessor. copy ( )
289
289
}
@@ -524,7 +524,7 @@ package struct Candidate {
524
524
// Creates a buffer of `capacity` elements of type `T?`, each initially set to nil.
525
525
///
526
526
/// 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 ] {
528
528
let scratchArea = UnsafeMutablePointer< T?> . allocate( capacity: capacity)
529
529
scratchArea. initialize ( repeating: nil , count: capacity)
530
530
defer {
0 commit comments