Skip to content

Commit 86dfd12

Browse files
committed
Make the index increment unchecked in UnsafeRawBufferPointer.Iterator.next
1 parent 2f37e10 commit 86dfd12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/UnsafeRawBufferPointer.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ extension UnsafeRawBufferPointer.Iterator: IteratorProtocol, Sequence {
170170
// Validly constructed buffer pointers also have an _end that is strictly
171171
// greater than or equal to _position.
172172
// So we do not need to do checked arithmetic here as we cannot possibly overflow.
173-
_position = position + 1
173+
_position = position &+ 1
174174
return result
175175
}
176176
}

0 commit comments

Comments
 (0)