@@ -27,7 +27,7 @@ public struct LazyChunked<Base: Collection, Subject> {
2727 @usableFromInline
2828 internal var firstUpperBound : Base . Index
2929
30- @usableFromInline
30+ @inlinable
3131 internal init (
3232 base: Base ,
3333 projection: @escaping ( Base . Element ) -> Subject ,
@@ -51,7 +51,7 @@ extension LazyChunked: LazyCollectionProtocol {
5151 @usableFromInline
5252 internal var baseRange : Range < Base . Index >
5353
54- @usableFromInline
54+ @inlinable
5555 internal init ( _ baseRange: Range < Base . Index > ) {
5656 self . baseRange = baseRange
5757 }
@@ -72,7 +72,7 @@ extension LazyChunked: LazyCollectionProtocol {
7272
7373 /// Returns the index in the base collection of the end of the chunk starting
7474 /// at the given index.
75- @usableFromInline
75+ @inlinable
7676 internal func endOfChunk( startingAt start: Base . Index ) -> Base . Index {
7777 let subject = projection ( base [ start] )
7878 return base [ base. index ( after: start) ... ]
@@ -112,7 +112,7 @@ extension LazyChunked: BidirectionalCollection
112112{
113113 /// Returns the index in the base collection of the start of the chunk ending
114114 /// at the given index.
115- @usableFromInline
115+ @inlinable
116116 internal func startOfChunk( endingAt end: Base . Index ) -> Base . Index {
117117 let indexBeforeEnd = base. index ( before: end)
118118
@@ -174,7 +174,7 @@ extension Collection {
174174 /// predicate.
175175 ///
176176 /// - Complexity: O(*n*), where *n* is the length of this collection.
177- @usableFromInline
177+ @inlinable
178178 internal func chunked< Subject> (
179179 on projection: ( Element ) throws -> Subject ,
180180 by belongInSameGroup: ( Subject , Subject ) throws -> Bool
@@ -273,7 +273,7 @@ extension ChunkedByCount: Collection {
273273 @usableFromInline
274274 internal let baseRange : Range < Base . Index >
275275
276- @usableFromInline
276+ @inlinable
277277 internal init ( _baseRange: Range < Base . Index > ) {
278278 self . baseRange = _baseRange
279279 }
@@ -290,6 +290,7 @@ extension ChunkedByCount: Collection {
290290 }
291291
292292 /// - Complexity: O(1)
293+ @inlinable
293294 public subscript( i: Index ) -> Element {
294295 precondition ( i < endIndex, " Index out of range " )
295296 return base [ i. baseRange]
@@ -392,7 +393,7 @@ extension ChunkedByCount {
392393 return index
393394 }
394395
395- @usableFromInline
396+ @inlinable
396397 internal func offsetForward(
397398 _ i: Index , offsetBy distance: Int , limit: Index ? = nil
398399 ) -> Index ? {
@@ -406,8 +407,8 @@ extension ChunkedByCount {
406407 }
407408
408409 // Convenience to compute offset backward base distance.
409- @inline ( __always )
410- private func computeOffsetBackwardBaseDistance(
410+ @inlinable
411+ internal func computeOffsetBackwardBaseDistance(
411412 _ i: Index , _ distance: Int
412413 ) -> Int {
413414 if i == endIndex {
@@ -423,7 +424,7 @@ extension ChunkedByCount {
423424 return distance * chunkCount
424425 }
425426
426- @usableFromInline
427+ @inlinable
427428 internal func offsetBackward(
428429 _ i: Index , offsetBy distance: Int , limit: Index ? = nil
429430 ) -> Index ? {
@@ -438,8 +439,8 @@ extension ChunkedByCount {
438439 }
439440
440441 // Helper to compute index(offsetBy:) index.
441- @inline ( __always )
442- private func makeOffsetIndex(
442+ @inlinable
443+ internal func makeOffsetIndex(
443444 from i: Index , baseBound: Base . Index , distance: Int , baseDistance: Int ,
444445 limit: Index ? , by limitFn: ( Base . Index , Base . Index ) -> Bool
445446 ) -> Index ? {
0 commit comments