@@ -122,7 +122,7 @@ The operation `UnsafeMutableBufferPointer.swapAt` swaps the values at the given
122
122
123
123
``` swift
124
124
extension UnsafeMutableBufferPointer {
125
- @unsafe public func swapAt (_ i : Element , _ j : Element ) {
125
+ @unsafe public func swapAt (_ i : Index , _ j : Index ) {
126
126
guard i != j else { return }
127
127
precondition (i >= 0 && j >= 0 )
128
128
precondition (unsafe i < endIndex && j < endIndex)
@@ -476,7 +476,7 @@ A function marked `@unsafe` is unsafe to use, so any clients that have enabled s
476
476
477
477
``` swift
478
478
extension UnsafeMutableBufferPointer {
479
- @unsafe public func swapAt (_ i : Element , _ j : Element ) {
479
+ @unsafe public func swapAt (_ i : Index , _ j : Index ) {
480
480
guard i != j else { return }
481
481
precondition (i >= 0 && j >= 0 )
482
482
precondition (unsafe i < endIndex && j < endIndex)
@@ -493,7 +493,7 @@ We could choose to make `@unsafe` on a function acknowledge all uses of unsafe c
493
493
494
494
``` swift
495
495
extension UnsafeMutableBufferPointer {
496
- @unsafe public func swapAt (_ i : Element , _ j : Element ) {
496
+ @unsafe public func swapAt (_ i : Index , _ j : Index ) {
497
497
guard i != j else { return }
498
498
precondition (i >= 0 && j >= 0 )
499
499
precondition (i < endIndex && j < endIndex)
@@ -552,7 +552,7 @@ The `unsafe` expression proposed here covers unsafe constructs within a single
552
552
553
553
``` swift
554
554
extension UnsafeMutableBufferPointer {
555
- @unsafe public func swapAt (_ i : Element , _ j : Element ) {
555
+ @unsafe public func swapAt (_ i : Index , _ j : Index ) {
556
556
guard i != j else { return }
557
557
precondition (i >= 0 && j >= 0 )
558
558
precondition (i < endIndex && j < endIndex)
0 commit comments