File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,13 @@ extension Unsafe${Mutable}BufferPointer where Element: ~Copyable {
255
255
@safe
256
256
public var endIndex : Int { count }
257
257
258
+ @inlinable
259
+ @_preInverseGenerics
260
+ public var indices : Range < Int > {
261
+ // Not checked because init forbids negative count.
262
+ unsafe Range( uncheckedBounds: ( 0 , count) )
263
+ }
264
+
258
265
@inlinable
259
266
@_preInverseGenerics
260
267
public func index( after i: Int ) -> Int {
@@ -684,13 +691,6 @@ extension Unsafe${Mutable}BufferPointer:
684
691
_debugPrecondition ( range. upperBound <= bounds. upperBound)
685
692
}
686
693
687
- @inlinable // unsafe-performance
688
- @safe
689
- public var indices: Indices {
690
- // Not checked because init forbids negative count.
691
- return unsafe Indices( uncheckedBounds: ( startIndex, endIndex) )
692
- }
693
-
694
694
/// Accesses a contiguous subrange of the buffer's elements.
695
695
///
696
696
/// The accessed slice uses the same indices for the same elements as the
You can’t perform that action at this time.
0 commit comments