File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ struct CustomContiguousCollection: Collection {
198
198
var endIndex : Index { storage. count }
199
199
func index( after i: Index ) -> Index { i+ 1 }
200
200
201
+ @inline ( never)
201
202
func withContiguousStorageIfAvailable< R> (
202
203
_ body: ( UnsafeBufferPointer < UInt8 > ) throws -> R
203
204
) rethrows -> R ? {
@@ -214,6 +215,13 @@ struct CustomNoncontiguousCollection: Collection {
214
215
var startIndex : Index { 0 }
215
216
var endIndex : Index { storage. count }
216
217
func index( after i: Index ) -> Index { i+ 1 }
218
+
219
+ @inline ( never)
220
+ func withContiguousStorageIfAvailable< R> (
221
+ _ body: ( UnsafeBufferPointer < UInt8 > ) throws -> R
222
+ ) rethrows -> R ? {
223
+ nil
224
+ }
217
225
}
218
226
let allStringsCustomContiguous = CustomContiguousCollection ( allStringsBytes)
219
227
let asciiCustomContiguous = CustomContiguousCollection ( Array ( ascii. utf8) )
You can’t perform that action at this time.
0 commit comments