mirror of
https://github.com/apple/swift-collections
synced 2026-11-27 04:54:21 +00:00
Merge pull request #549 from AZero13/ok
first should get the Initialized elements
This commit is contained in:
1 file changed
+2
-1
@@ -64,7 +64,8 @@ extension InputSpan where Element: ~Copyable {
|
||||
@unsafe
|
||||
internal func _first() -> UnsafeMutableRawPointer {
|
||||
// NOTE: `_pointer` must be known to be not-nil.
|
||||
unsafe _start().advanced(by: _count &* MemoryLayout<Element>.stride)
|
||||
let offset = (capacity &- _count) &* MemoryLayout<Element>.stride
|
||||
return unsafe _start().advanced(by: offset)
|
||||
}
|
||||
|
||||
@unsafe
|
||||
|
||||
Reference in new issue
Block a user