@@ -400,13 +400,13 @@ internal func _merge<Element>(
400
400
// After moving elements, the storage and buffer look like this, where
401
401
// `x` is uninitialized memory:
402
402
//
403
- // Storage: [4, 4, 7, 8, 9, 6 , x, x, x, x, x]
404
- // ^ ^ ^
405
- // srcHigh destLow destHigh (past the end)
403
+ // Storage: [4, 4, 7, 8, 9, 16 , x, x, x, x, x]
404
+ // ^ ^
405
+ // srcHigh/destLow destHigh (past the end)
406
406
//
407
- // Buffer: [8, 8, 10, 12, 15, x, ...]
408
- // ^ ^
409
- // bufferLow bufferHigh
407
+ // Buffer: [8, 8, 10, 12, 15, x, ...]
408
+ // ^ ^
409
+ // bufferLow bufferHigh
410
410
buffer. moveInitialize ( from: mid, count: highCount)
411
411
bufferHigh = bufferLow + highCount
412
412
@@ -555,7 +555,7 @@ extension UnsafeMutableBufferPointer {
555
555
// (a) - for all i in 2..<runs.count:
556
556
// - runs[i - 2].count > runs[i - 1].count + runs[i].count
557
557
// (b) - for c = runs.count - 1:
558
- // - runs[i - 1].count > runs[i ].count
558
+ // - runs[c - 1].count > runs[c ].count
559
559
//
560
560
// Loop until the invariant is satisified for the top four elements of
561
561
// `runs`. Because this method is called for every added run, and only
0 commit comments