@@ -233,37 +233,37 @@ extension EvenChunks {
233
233
}
234
234
}
235
235
236
- public struct EvenChunksIndex < Base: Comparable > : Comparable {
237
- /// The range corresponding to the chunk at this position.
238
- @usableFromInline
239
- internal var baseRange : Range < Base >
240
-
241
- /// The offset corresponding to the chunk at this position. The first chunk
242
- /// has offset `0` and all other chunks have an offset `1` greater than the
243
- /// previous.
244
- @usableFromInline
245
- internal var offset : Int
246
-
247
- @inlinable
248
- internal init ( _ baseRange: Range < Base > , offset: Int ) {
249
- self . baseRange = baseRange
250
- self . offset = offset
251
- }
252
-
253
- @inlinable
254
- public static func == ( lhs: Self , rhs: Self ) -> Bool {
255
- lhs. offset == rhs. offset
236
+ extension EvenChunks : Collection {
237
+ public struct _Index : Comparable {
238
+ /// The range corresponding to the chunk at this position.
239
+ @usableFromInline
240
+ internal var baseRange : Range < Base . Index >
241
+
242
+ /// The offset corresponding to the chunk at this position. The first chunk
243
+ /// has offset `0` and all other chunks have an offset `1` greater than the
244
+ /// previous.
245
+ @usableFromInline
246
+ internal var offset : Int
247
+
248
+ @inlinable
249
+ internal init ( _ baseRange: Range < Base . Index > , offset: Int ) {
250
+ self . baseRange = baseRange
251
+ self . offset = offset
252
+ }
253
+
254
+ @inlinable
255
+ public static func == ( lhs: Self , rhs: Self ) -> Bool {
256
+ lhs. offset == rhs. offset
257
+ }
258
+
259
+ @inlinable
260
+ public static func < ( lhs: Self , rhs: Self ) -> Bool {
261
+ lhs. offset < rhs. offset
262
+ }
256
263
}
257
264
258
- @inlinable
259
- public static func < ( lhs: Self , rhs: Self ) -> Bool {
260
- lhs. offset < rhs. offset
261
- }
262
- }
263
-
264
- extension EvenChunks : Collection {
265
265
public typealias Element = Base . SubSequence
266
- public typealias Index = EvenChunksIndex < Base . Index >
266
+ public typealias Index = SubSequence . _Index
267
267
public typealias SubSequence = EvenChunks < Base . SubSequence >
268
268
269
269
@inlinable
@@ -355,7 +355,7 @@ extension EvenChunks: Collection {
355
355
}
356
356
}
357
357
358
- extension EvenChunksIndex : Hashable where Base: Hashable { }
358
+ extension EvenChunks . _Index : Hashable where Base. Index : Hashable { }
359
359
360
360
extension EvenChunks : BidirectionalCollection
361
361
where Base: BidirectionalCollection
0 commit comments