@@ -216,30 +216,30 @@ public struct HTTPFields: Sendable, Hashable {
216
216
}
217
217
}
218
218
219
- private func fields( for name: HTTPField . Name ) -> some Sequence < HTTPField > {
220
- struct HTTPFieldSequence : Sequence {
221
- let fields : [ ( field: HTTPField , next: UInt16 ) ]
222
- let index : UInt16
219
+ private struct HTTPFieldSequence : Sequence {
220
+ let fields : [ ( field: HTTPField , next: UInt16 ) ]
221
+ let index : UInt16
223
222
224
- struct Iterator : IteratorProtocol {
225
- let fields : [ ( field: HTTPField , next: UInt16 ) ]
226
- var index : UInt16
223
+ struct Iterator : IteratorProtocol {
224
+ let fields : [ ( field: HTTPField , next: UInt16 ) ]
225
+ var index : UInt16
227
226
228
- mutating func next( ) -> HTTPField ? {
229
- if self . index == . max {
230
- return nil
231
- }
232
- let ( field, next) = self . fields [ Int ( self . index) ]
233
- self . index = next
234
- return field
227
+ mutating func next( ) -> HTTPField ? {
228
+ if self . index == . max {
229
+ return nil
235
230
}
231
+ let ( field, next) = self . fields [ Int ( self . index) ]
232
+ self . index = next
233
+ return field
236
234
}
235
+ }
237
236
238
- func makeIterator( ) -> Iterator {
239
- Iterator ( fields: self . fields, index: self . index)
240
- }
237
+ func makeIterator( ) -> Iterator {
238
+ Iterator ( fields: self . fields, index: self . index)
241
239
}
240
+ }
242
241
242
+ private func fields( for name: HTTPField . Name ) -> HTTPFieldSequence {
243
243
let index = self . _storage. ensureIndex [ name. canonicalName] ? . first ?? . max
244
244
return HTTPFieldSequence ( fields: self . _storage. fields, index: index)
245
245
}
0 commit comments