File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Sources/ConnectionPoolModule Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ struct TinyFastSequence<Element>: Sequence {
2929 self . base = . none( reserveCapacity: 0 )
3030 case 1 :
3131 self . base = . one( collection. first!, reserveCapacity: 0 )
32+ case 2 :
33+ self . base = . two( collection. first!, collection. last!, reserveCapacity: 0 )
3234 default :
3335 if let collection = collection as? Array < Element > {
3436 self . base = . n( collection)
@@ -46,7 +48,7 @@ struct TinyFastSequence<Element>: Sequence {
4648 case 1 :
4749 self . base = . one( max2Sequence. first!, reserveCapacity: 0 )
4850 case 2 :
49- self . base = . n ( Array ( max2Sequence) )
51+ self . base = . two ( max2Sequence. first! , max2Sequence . second! , reserveCapacity : 0 )
5052 default :
5153 fatalError ( )
5254 }
@@ -169,7 +171,7 @@ struct TinyFastSequence<Element>: Sequence {
169171
170172 case . n( let array) :
171173 if self . index < array. endIndex {
172- defer { self . index += 1 }
174+ defer { self . index += 1 }
173175 return array [ self . index]
174176 }
175177 return nil
You can’t perform that action at this time.
0 commit comments